> Le 17 janv. 2015 à 14:59, Frankie Bagnardi <[email protected]> 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.)

—Claude

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to