-
Notifications
You must be signed in to change notification settings - Fork 20
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
Make "->" works in all for-loop to replace "do yield" #764
Comments
Those two loops are considered "legacy" and should be discouraged, though. |
Yes, though I suppose this means we should consider giving deprecation warnings too |
I don't really see that as being too good of a route. I'm not sure it's uniformly accepted that the equivalent Array/List/etc combinators are the way forward. Those can also be a bit more annoying to type out since you have to play the game of aligning the ending parenthesis. |
Generally I think this should be done for completeness' sake, even though we want people to use the collection functions instead. |
The proposition is that these two forms:
should be deprecated in favour of
|
Where is this proposed? Also, this would represent a regression, since you can't have the index while you're doing that. |
Oh that's what I'm suggesting - that this is the natural way to interpret/resolve/progress this suggestion. I'm not really pushing it - I'm just saying it would be reasonable to completely remove the These two looping constructs
are only in F# because of OCaml (Note
The loops |
Hmmm. Okay, perhaps. I just feel like I'd rather focus on deprecating things that are problematic but possible (e.g, |
Given that |
I propose we should had the same way to use "->" in all for-loop segments
Now :
for X in XXX do yield YYY ======> for X in XXX -> YYY (OK)
for X=x to y do yield YYY ======> for X=x to y -> YYY (Syntax Error)
for X=x downto y do yield YYY ===> for X=x downto y -> YYY (Syntax Error)
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
The text was updated successfully, but these errors were encountered: