A new ES6 draft is available

Allen Wirfs-Brock allen at wirfs-brock.com
Sat Jan 17 11:51:05 PST 2015


On Jan 17, 2015, at 11:37 AM, Frankie Bagnardi wrote:

> arguments.new.target makes more sense to me.  

the problem with this or hanging anything off of `arguments` is that it can be a potential accidental capability leak if people  pass `arguments` around thinking they are just passing an array of values.  That's why ES5 removed `arguments.callee` from strict mode.

> 
> If we do want to move towards keyword.identifier being a normal occurance, then I think new.target is perfectly reasonable.  I'm all for that, and it makes the job of tooling a lot simpler where it's used.
> 
> In the current draft, is new["target"] a syntax error, or equivalent to new.target?  

syntax error!  `new.target` is a special form and not a property access.  We probably don't want to allow make it seem more like a property access by allowing a `[ ]` formulation.

Allen



More information about the es-discuss mailing list