A new ES6 draft is available

Brendan Eich brendan at mozilla.org
Sat Jan 17 10:50:46 PST 2015

Fabrício Matté wrote:
> I agree with Frankie. Assume a developer who has never seen this 
> `new.target` construct before.

In general, ES6 has new syntax, so this is a "learn it and use it" bump, 
one of many.

> They will first think that this is an invalid expression, as `new` is 
> an operator. Then, upon seeing this code execute, the natural question 
> is "What is `new`? Is it an identifier injected into Environment 
> Records created by [[Call]] and [[Construct]]? Does this identifier 
> resolve to an object (so that the MemberExpression would make sense)?"]

new.target in the proposal (which does not yet have consensus) evaluates 
to an object, but (new) is a syntax error as in ES1-5.

Yeah, it's a bit odd to grab new.identifier syntax-space and start by 
defining only new.target. Alternatives welcome. new^ already got an 
anti-grawlix reaction, new? did too (perhaps less but still).


More information about the es-discuss mailing list