-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate { start..finish } { start..step..finish }
#17772
base: main
Are you sure you want to change the base?
Conversation
❗ Release notes requiredCaution No release notes found for the changed paths (see table below). Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format. The following format is recommended for this repository:
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request. You can open this PR in browser to add release notes: open in github.dev
|
{ 1..10 }
as sequence expression{ 1;10 }
as sequence expression
59c5208
to
d643cfb
Compare
I am not 100% sure what exactly was approved in the comment, but I don't immediately see it as "let's allow omitting |
@vzarytovskii what I understood from Don’s comment was that we want to enforce the To do this we need to have valid code for Also note that To summarise my current approach is:
|
Hm, I've read it a bit differently -
I read it as - when we immediately pass it to collections, then we do not require "seq" (even for now illegal constructs), otherwise (if not passed to collections) we add a warning enforcing (suggesting really) to add "seq" to "{ x .. y }". But I have problems decoding the comment w.r.t. allowing other constructs to omit "seq" when not passed to collections (when returning or binding for example. |
what about |
That's what I understood. Show a diagnostic suggesting adding "seq" if it's not passed to collection. And allow other constructs only when passed to collections. I'd wait for other folks to read it through, I might be misunderstanding things. |
{ 1;10 }
as sequence expression{ start..finish }
and { start;finish }
using a warning
{ start..finish }
and { start;finish }
using a warning { start..finish } { start..step..finish }
833a633
to
4d45b1a
Compare
Description
Implements fsharp/fslang-suggestions#1033
Deprecate
{ start..finish }
and{ start..step..finish }
Checklist