-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Feature request: allow more update operators, e.g. a ⊗= 2
as shorthand for a = a ⊗ 2
#15964
Comments
I think comparison operators should not be included, for consistency. After all, |
It is always simple to define some more update operator. But the true question is whether they are in-place? |
Not the place, @Sisyphuss. |
This seems like a reasonable proposal to me – shall I mark it as accepted, @JeffBezanson? |
Yes. |
Not release blocking. Best! |
a ⊗= 2
as sorthand for a = a ⊗ 2
a ⊗= 2
as shorthand for a = a ⊗ 2
This feature would make sense because there is no situation in Julia where an operator immediately followed by an equal sign makes sense, except as an updating operator. For example, |
Only a subset of available operators allow the shorthand
OPERATOR=
notation. I think the current situation is that only ASCII operators are covered.e.g.
I think it would be reasonable if all operators which allow binary infix syntax would also allow the shorthand. (This came up when I defined a custom
⊗
operator.)The text was updated successfully, but these errors were encountered: