An "extend" operator is a natural companion to <|

Axel Rauschmayer axel at rauschma.de
Tue Jul 19 01:37:37 PDT 2011


> From: Brendan Eich <brendan at mozilla.com>
> Date: July 19, 2011 5:59:16 GMT+02:00
> To: Allen Wirfs-Brock <allen at wirfs-brock.com>
> Cc: es-discuss <es-discuss at mozilla.org>
> Subject: Re: An "extend" operator is a natural companion to <|
> 
> 
> On Jul 18, 2011, at 6:50 PM, Allen Wirfs-Brock wrote:
> 
>>> Even in Harmony, many of the new methods being adding are "static": Proxy.create(), Proxy.createFunction(), Proxy.isTrapping(), Object.getPropertyDescriptor(), Object.getPropertyNames(), Object.is(), Number.isFinite(), Number.isNan()... If anything non-instance methods are becoming more important in JS as time goes on (though modules might change that).
>> 
>> Brendan and I recently had a discussion about some of these and it isn't clear that they are all in the correct places.  Of the ones you mentioned, I'm not so sure I would call Proxy a constructor.  (you never say, new Proxy() right?) it is really a factory object which means the methods you name are instance side.
> 
> No, rather Proxy is a module name. We could even spec it for ES.next as something users must import from a standard library MRL:
> 
>   module Proxy from "@proxy";
> 
> and avoid polluting the global scope with 'Proxy' -- users get to name the module. With ES.next modules, one can even selectively import:
> 
>   import createFunction from "@proxy";


This is awesome! A lot of “static” methods will go away now that we finally can have real modules.

-- 
Dr. Axel Rauschmayer

axel at rauschma.de
twitter.com/rauschma

home: rauschma.de
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110719/4f7f8434/attachment.html>


More information about the es-discuss mailing list