Determining if an object can be constructed

Claude Pache claude.pache at gmail.com
Thu Jan 19 08:26:43 UTC 2017


> Le 17 janv. 2017 à 23:48, Isiah Meadows <isiahmeadows at gmail.com> a écrit :
> 
> Out of curiosity, why are classes specified to have a [[Call]] internal method instead of special-casing `typeof` and friends to work with them? Somewhat of a tangent, but just a curious question on the design decision.
> 
I guess that class constructors could have been specified without a [[Call]] internal method, with the cost of amending all the places where “constructible” implicitly implies “callable”. But why (and how) do you need “special-casing `typeof` and friends”? (The way the question is formulated, avoiding special-casing would be an argument for the current design. But I miss what are the special cases you have in mind, especially regarding `typeof`.)

—Claude

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170119/5a7f41b7/attachment.html>


More information about the es-discuss mailing list