Anne van Kesteren wrote:
On Mon, Jan 13, 2014 at 3:40 PM, Brendan Eich<[email protected]> wrote:
> We want to keep the relatively few invariants in the language that we have.
> Why is it so important to have == for (mutable) URLs?
The alternative is rather ugly. You don't want to sometimes write ==
(value objects) and sometimes write .equals() (non-value objects,
method name won't always be the same, e.g. we have isEqualNode()
already).
The point is you *do* want == to mean, for two values, something that's
true on the next line and the one three after that, no matter what
mutations to the heap might occur (note: I'm not talking about rebinding
variables).
At least, some people do. If we can't agree, the
conservative-language-design outcome will still not let mutable objects
be sometimes==.
I know, other languages allow this. The experience in those languages
seems mixed to bad. Anyway, that's my view. What do others think?
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss