Revise operator syntax and == semantics #3765
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Milestone
The current spec introduces special identifiers, equals and negate for the == and unary minus operators.
This is inelegant, and raises various issues,such as the meaning of these names when used directly.
The name equals in particular, is liable to be used directly by Java programmers.
The == function semantics are also problematic, as the special treatment of identity, while attractive, does not work well with the bizarre semantics of NaN.
Instead, we will allow unary minus to be defined as an operator named "-". It will be distinguished from binary minus by its arity. We will define == as a method, despite the fact that the expression e1 == e2 will not directly call the == method, but first test against null (but not for identity).
The details are in the 0.11 spec draft (sections 7.1.1 and 10.20 primarily).
The text was updated successfully, but these errors were encountered: