-
Notifications
You must be signed in to change notification settings - Fork 2
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
Default-argument syntax ambiguity #2
Comments
You mean if you want to use
That errors - as documented for
I'm happy about any suggestions, but I'm struggling to come up with anything better than |
Yeah. |
Right - those also have the disadvantage of being either unicode, or requiring whitespace surrounding the operator. That's not good either, because it means this is harder to type, and the whitespace makes the entire invocation quite a bit longer. Having to write out |
Normally
b=intgen
would makeintgen
the default argument to the function, but here it's a generator for arguments to the function. What if I actually want to pass a generator as an argument? What doesSupposition.@check function commutative(a=3, b=4)
do -- does it error, requiring aJust(3)
or what?It seems ambiguous and potentially confusing. Perhaps it is worth considering alternative syntax, or maybe it'll grow on me.
The text was updated successfully, but these errors were encountered: