-
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
RFC FS-1033: Deprecate places where seq
can be omitted
#17772
base: main
Are you sure you want to change the base?
Conversation
❗ Release notes required
|
{ 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 }
c05956b
to
9c05432
Compare
9c05432
to
47b4ef0
Compare
{ start..finish } { start..step..finish }
seq
can be omitted
4fc0837
to
de89b44
Compare
Description
Implements fsharp/fslang-suggestions#1033
Deprecate
{ start..finish }
and{ start..step..finish }
Before
To create a sequence, you can use
{ start..finish }
or{ start..finish..step }
.After
A new warning will be raised when using
{ start..finish }
or{ start..finish..step }
to create a sequence.To create a sequence, you need to use
seq { start..finish }
orseq { start..finish..step }
.Checklist
seq
can be omitted. fsharp/fslang-design#788