delegating to typed objects

Brendan Eich brendan at mozilla.org
Mon Jul 9 15:34:40 PDT 2007


On Jul 9, 2007, at 2:19 PM, Jeff Dyer wrote:

> See my comments above. There is no need for copy on write  
> fixtures,  just a plain old expando on ‘f’ for ‘x’.

Ok, I see your point.

> If you want type guarantees, use classes.

Rather, use classes or structural types only, not constructor  
functions that delegate to class instances. Or if using constructor  
functions that delegate to class instances, use prototype methods in  
the class to unbind |this|, and make sure those methods either (a)  
are generic or (b) enforce the necessary |this| type constraints.

A bit of a mouthful compared to your statement. :-/

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20070709/0c4b274d/attachment-0002.html 


More information about the Es4-discuss mailing list