On Sep 10, 2008, at 3:07 AM, Sam Ruby wrote:

> In such a scenario, is there value in providing a Decimal wrapper type
> at all?

So people can add methods that we did not think of to  
Decimal.prototype. But you assumed static methods only, so perhaps  
you meant to exclude this use-case.

Extending standard constructor prototypes is frowned upon currently  
because such user-defined prototype properties are enumerable, but  
Object.defineProperty/ies stand ready. And people do use this use- 
case today, whether we like it or not.


> It occurs to me that the latter case (looking up after wrapping)
> trades a single wrapping at function entry against potentially
> multiple wrappings that may occur inside the function.

Wrapping must be done at most once, lazily on first |this| use if  
possible but at most once only, per |this| parameter binding.

/be

_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to