>> I like the idea of replacing the method name “constructor” with something 
>> better, but “new” suggests instantiation *and* initialization to me. Is 
>> “init” a possibility?
> 
> Who said anything about "replacing"?
> 
> If we are trying to match or sugar the prototypal pattern, then whatever the 
> constructor name or keyword in the syntax, there must be for class C a 
> back-link C.prototype.constructor.


I only meant replacing in as far as the method that was previously called 
“constructor” is now called “new” in Allen’s example:

let Point = class {
   x: 0,  //not really needed unless defining an object exemplar 
   y: 0, 
   new(x,y) {
      this.x = x;
      this.y=y;
   }
};

-- 
Dr. Axel Rauschmayer
a...@rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to