delegating to typed objects
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. :-/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Es4-discuss