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
In current examples patterns matched show a return statement, I feel it would be both more intuitive and more usefull if the pattern matching statement itselfs resolves a value.
This is what #116 is about--I believe the proposal initially allowed both expressions and statements in the branches unconditionally, which caused problems with things like break and continue. The readme examples with return probably just aren't updated yet.
Hello,
In current examples patterns matched show a return statement, I feel it would be both more intuitive and more usefull if the pattern matching statement itselfs resolves a value.
Contrast the following.
Current:
Syntax I propose:
Allows direct assignment to variables:
Allows intuitive integration into lambdas:
I would like to hear other's thoughts on this.
Thanks,
Joris
The text was updated successfully, but these errors were encountered: