On May 21, 2013, at 1:23, "Anne van Kesteren" 
<[email protected]<mailto:[email protected]>> wrote:

On Tue, May 21, 2013 at 6:20 AM, Domenic Denicola
<[email protected]<mailto:[email protected]>> wrote:
As long as the contract that `map.set(x, y); map.get(x) === y` works for any 
`x` and `y`, then you're probably fine.

I think it would have to subclass those methods by using toString() on
the argument passed. It seems that would still be Map-like though.


Hmm, so that invariant wouldn't hold? I assume `has` would be similarly broken? 
Seems… not so  Map like, besides perhaps having some operations with the same 
name as Map's.

Relevant: http://en.wikipedia.org/wiki/Liskov_substitution_principle
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to