jason.orendorff at gmail.com
Mon Dec 3 15:03:06 PST 2012
On Sat, Dec 1, 2012 at 2:38 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:
> The simplification I've thought about is eliminating [[Construct]] as an
> internal method/Proxy trap and just making the call @@Create/call
> consturctor sequence the evaluation semantics of the new operator. But
> I've not yet convinced myself that this is sufficient to capture all of the
> "called as constructor"/"called as a function" semantic silliness that some
> chapter 15 built-ins have. I'm also not sure that DOM and friends don't
> have other dependencies on a reified [[Construt]]
The simplification I had in mind was changing [[Construct]] from an
internal method/Proxy trap to an ordinary .@@construct method. There would
be a @@construct/constructor split rather than a
But on reflection, it didn't seem like that would be simpler in practice.
Having two separately hookable phases of object construction is just right.
A class can easily customize either behavior in a way that not only works,
but will still work when the class is subclassed further.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss