Brendan Eich (2014-01-13T16:28:57.000Z)
Anne van Kesteren wrote:
> On Mon, Jan 13, 2014 at 3:40 PM, Brendan Eich<brendan at mozilla.com>  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
domenic at domenicdenicola.com (2014-01-22T19:26:43.982Z)
Anne van Kesteren wrote:
> 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?