How to fix the `class` keyword

Matthew Robb matthewwrobb at gmail.com
Wed Mar 4 21:50:19 UTC 2015


On Wed, Mar 4, 2015 at 2:29 PM, Kevin Smith <zenparsing at gmail.com> wrote:

> In order to allow subclassing as built-ins, we had to opt for the builtin
> model.


​Help me make sure I am understanding correctly. This decision doe​s not
help in making DOM subclassable. It doesn't simply or easily integrate into
all the existing and somewhat common OOP patterns in user land. What
built-ins are we talking about then? The decision to fork things here seems
MOSTLY motivated by a desire to support `class extends Array{}`... Am I
crazy? If not.... There had to be a better way.

On the issue of calling class constructors, I would AT LEAST have preferred
implicit new on all calls to class constructors. Sure you might get extra
allocation weight but the way it stands now seems like it could only lead
to errors in people's assumptions... Assumptions people have built up in
their experience using the language and that are not only safe TODAY but
considered best practice.



- Matthew Robb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150304/948c9fa3/attachment.html>


More information about the es-discuss mailing list