You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presumably g(f(_+1)) would mean g(f(fun i -> i+1)), resolving to the closest brackets, but g(f <| _+1) would mean g(fun i -> f(i+1)). People would find this confusing. It will be hard to find a bracketing rule that is both consistent and unsurprising. Even something simple like (_+(1+_)) I believe would generate a lot of interpretations. If the notation didn't use round brackets then this problem would go away, but F# currently restricts itself to ascii characters and all the suitable ones got taken straight away.
Some suggestions in #168 are intermediate approaches to the same problem (shorter syntax for fun x ->) which are more readable and don't give the same ambiguities.
Submitted by Khan Thompson on 3/21/2014 12:00:00 AM
37 votes on UserVoice prior to migration
Add in shorthand syntax for anonymous functions, even if it is only for single argument functions.
For example:
As opposed to
It would be great to have this shorthand so that our anonymous functions are shorter than the C#ers' :).
Original UserVoice Submission
Archived Uservoice Comments
The text was updated successfully, but these errors were encountered: