A new ES6 draft is available
claude.pache at gmail.com
Sat Jan 17 09:40:43 PST 2015
> Le 17 janv. 2015 à 14:59, Frankie Bagnardi <f.bagnardi at gmail.com> a écrit :
> I'm also expecting a lot of questions about 'what is this new.target thing in this code?', 'is new a variable?', 'where does it come from?', 'isn't new an operator?', etc.
> if (this instanceof MyDate) ...
> ... is clearer, but I guess it needs to be disallowed because of the other rules.
I don't find the "this instanceof MyDate" test clearer, but it may appear so because it is idiomatic. In fact, it is a somewhat indirect way to test what you want. (And it may be incorrect in some cases, which is a danger when you use indirect paths.)
More information about the es-discuss