Kevin Smith wrote:
Well, what I'm trying to point out is that it's always an error to set "this" if "new^" is undefined. So it's kind of strange to force the user to explicitly write that conditional: constructor(x, y) { if (new^) this = new super(x); this.y = y; } With the header approach, it's taken care of: constructor(x, y) : super(x) { this.y = y; } (using colon just to avoid bikeshedding)
Isn't the latter (since it specifies ": super(x)") actually identical to constructor(x, y) { this = new super(); this.y = y; } IOW, isn't it "I am constructor only and will throw if {[Call]]ed)? Herby _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss