Sebastian Markbåge (2013-12-29T02:44:15.000Z)
domenic at domenicdenicola.com (2014-01-08T19:54:37.715Z)
> Adding class syntax as (mostly) sugar for the prototypal pattern does not > obviously mean rejecting all unusual or exceptional variants possible in > the prototypal pattern. I say let `super` be used even in `class C{}`'s > constructor, and let return-from-constructor work without requiring > `[Symbol.create]`. JS is dynamic. An example where `super` can be used in `class C { }` would be if you use an existing class descriptor to later create a specialized framework class out of it. An existing framework may have an internal base class that their old syntax automatically added. This could allow them a plumbing function to turn class descriptions into framework specific classes. ```js class C { constructor() { super(); } }; Framework.registerComponentTypes({ 'C': C }); ``` Either by using `setPrototypeOf`, or using `toMethod` on the constructor.