-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support for more user defined arithmetical operators #412
Comments
Removed Type-Defect label. |
This comment was originally written by drfibonacci@google.com Added Triaged label. |
I'm renaming this issue so it reflects its content more clearly. I think adding more user definable operators is a definite possibility in the future, but I don't think that will include the specific ones listed here. The reason is that they are all derived. If you define what + (or - or * or /) operator you want, the meaning of += is derived from that. We do not want the two to diverge. Set owner to @gbracha. |
Added this to the Later milestone. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
Closed by accident |
Like Gilad says, we specifically don't want to allow overriding the self-assignment operators because users could make them diverge from their desugaring, which is almost never a good idea. (Even C#'s use of Since those are the operators this bug originally refers to, I'm going to go ahead and close this out. Arbitrary user-defined custom operators are a different kettle of fish. |
This issue was originally filed by domi...@google.com
Support for +=, -=, *= and /= on num and made available to be overloaded.
The text was updated successfully, but these errors were encountered: