es-discuss Digest, Vol 95, Issue 45

Allen Wirfs-Brock allen at wirfs-brock.com
Mon Jan 19 11:06:27 PST 2015


On Jan 19, 2015, at 10:43 AM, Kevin Smith wrote:

> With 'new.target'  that complexity all goes away and I see no particularly reason to discourage constructors that 'new' themselves when called as functions.
> 
> Do you think that's what the new built-in constructors (Map, Set, etc.) should do, then?  (Act as factories when called).

They're currently spec'ed to throw.  I wouldn't change that for ES6. It could change in the future.

allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150119/940c2d65/attachment.html>


More information about the es-discuss mailing list