-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add syntax for implicit coefficients #707
Comments
Current operator precedence table:
New operator precedence table after this change:
|
If we do this, we should probably add a warning if we detect
since it'll change meaning from |
Problem—what are we supposed to do with this: f a b ** +c d Presumably it should go to: f(a, b ** +c, d) Also, what about: a ** b c Presumably that's a parse error? |
While we're at it, maybe we should also substantially decrease the precedence of
With the rationale for it below |
Only thing left to do here now is add a warning to catch syntax with a new meaning. |
Actually, this is a bad idea, because it encourages |
Julia has for constants only, IIRC. |
@munael The problem with that is that |
Should compile
to
The biggest problem, unfortunately, is that this would have a different precedence than implicit function application
f x
currently has, sinceis currently valid and compiles to
Probably, the best way to do this is to change the precedence of implicit function application to be just tighter than
*/@
and have implicit function application check if the function is anint
/float
/numpy
dtype and in that case use multiplication rather than function application. However, this would be a breaking change.The text was updated successfully, but these errors were encountered: