@@new

Allen Wirfs-Brock allen at wirfs-brock.com
Wed Jun 18 10:34:41 PDT 2014


On Jun 18, 2014, at 8:39 AM, Erik Arvidsson wrote:

> Another thing to consider is to ensure that @@create initializes all of its slots. For example Date[@@create]() could set its [[DateValue]] to NaN, Map[@@create]() could set its [[MapData]] to an empty list and so on.
> 
> This also fits how @@create works for DOM, where the creation of the instance would set up the internal DOM wrapper pointer, never exposing a non initialized DOM object to user code.

Right, that's the line I'm exploring.  If it can work out @@create are @@new more or less the same thing, except for the constructor rewriting.

Allen





More information about the es-discuss mailing list