Skip to content
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

Closed
DartBot opened this issue Nov 10, 2011 · 8 comments
Closed

Support for more user defined arithmetical operators #412

DartBot opened this issue Nov 10, 2011 · 8 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-not-planned Closed as we don't intend to take action on the reported issue P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Nov 10, 2011

This issue was originally filed by domi...@google.com


Support for +=, -=, *= and /= on num and made available to be overloaded.

@floitschG
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-Language labels.

@DartBot
Copy link
Author

DartBot commented Nov 11, 2011

This comment was originally written by drfibonacci@google.com


Added Triaged label.

@gbracha
Copy link
Contributor

gbracha commented Dec 8, 2011

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 Accepted label.
Changed the title to: "Support for more user defined arithmetical operators".

@anders-sandholm
Copy link
Contributor

Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@DartBot DartBot added Type-Enhancement area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed accepted type-enhancement A request for a change that isn't a bug labels Feb 29, 2016
@lrhn
Copy link
Member

lrhn commented Sep 1, 2016

Closed by accident

@lrhn lrhn reopened this Sep 1, 2016
@munificent
Copy link
Member

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 += for events gets weird at times.)

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-not-planned Closed as we don't intend to take action on the reported issue P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

8 participants