Anne van Kesteren (2014-01-13T15:59:28.000Z)
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).

I guess for now we should just go with url.equals(url2) then and see
where that takes us.

(Alex feels more strongly about this than I do.)


-- 
http://annevankesteren.nl/
domenic at domenicdenicola.com (2014-01-22T19:26:12.493Z)
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).

I guess for now we should just go with `url.equals(url2)` then and see
where that takes us.

(Alex feels more strongly about this than I do.)