@@new
C. Scott Ananian
ecmascript at cscott.net
Tue Jun 17 12:32:06 PDT 2014
+1.
I think you could also remove the 'construct' handler in Proxy
(http://people.mozilla.org/~jorendorff/es6-draft.html#sec-construct-internal-method
step 4), as the @@new method can be handled with the usual proxy
method dispatch mechanism. I'll leave it to someone who better
understands Proxies to give the details.
As I've mentioned before, I like the fact that this refactoring
reduces the amount of magic syntax in the language; 'new X' is now
just sugar. The fact that it gets rid of the 'new super' syntax is
even better (and demonstrates the virtue of shrinking the language in
this way).
--scott
More information about the es-discuss
mailing list