> There is no intrinsic reason why we needed to mandate that class constructors 
> should throw when called.  We even provided a simple and straight forward way 
> (new.target===undefined) that a ES constructor body can use to determine 
> whether it was called or new’ed.
> 
> I think we should just drop that throws when called feature of class 
> constructors.. 
> 
> (The restriction was added to future proof for the possibility of inventing 
> some other way to provide a class with distinct new/call behavior. I don’t 
> think we need nor can afford to wait for the invention of a new mechanism 
> which will inevitably be more complex than new.target, which we already have.)
> 
> I don't think this is an accurate representation of the discussion we had.

Any other reasons for throwing? It’d be great to know what they were!

-- 
Dr. Axel Rauschmayer
[email protected]
rauschma.de

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

Reply via email to