@@new

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


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

> I think the most concerning part of this proposal is that `constructor(...)` gets replaced by `static [Symbol.new](...)` with strange semantics regarding `this`. If we instead had @@new call constructor by default I think most of these concerns go away but then again we are back to two initialization functions and the possibility to observe an object that never went through its constructor.
> 
> 

This is also one of my bigger concerns.  I think the rewriting and reinterpretation of what the use wrote as a a constructor may be very problematic.   For example,how does this get translated:

class extends C {
  constructor() {
       super();
       super.foo();  //apply the inherited foo method to the new object  
  }
}

If we had a design that didn't require the rewriting of the user provided constructor I'd be much more comfortable.  Thinking...more latter...

Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140618/2536fed0/attachment.html>


More information about the es-discuss mailing list