New topic regarding Proxies: intercession for ===

P T Withington ptw at
Wed Oct 27 16:12:30 PDT 2010

On 2010-10-27, at 17:09, Brendan Eich wrote:

> JS will never be as simple as Self, but with proxies and value types based on them, it seems we might have get very close to the "right" answer to David's question.

2p. from the Dylan POV:  Dylan only had equality and identity (thinking Lisp had just way too many equivalences).  Dylan's MOP let you override (the equivalent of) `new` and `==`, but not `===`.  If you wanted value objects that were indistinguishable, you wrote a `new` implementation that always returned the identical object for parameters that would otherwise create `==` values (using a weak-key table).  If you only cared about equality, you wrote a `==` method that implemented your equality test.  You chose based on whether you expected to do more constructing or more comparing.

Is a proxy enough of a power tool that you just have to warn the user they must know what they are doing to use it?  I.e., if you override the MOP in some inconsistent way, it's not our fault?

More information about the es-discuss mailing list