The class operator: a bridge between object and function exemplers

Jake Verbaten raynos2 at gmail.com
Mon Nov 14 16:16:23 PST 2011


The whole concept is great.

What class does for the JS community is give everyone a standardized way to
write "classes". The simplest way to have a class is to call
ObjectLiteral.constructor and that's exactly what this class syntax does.

This also means that it's very easy to adapt to using this.

This class proposal is also orthogonal to object exemplars.

Apart from setting `obj.constructor.prototype = obj` in the background when
you declare an object literal and making function <| object work, we don't
actually need to augment new and instanceof to work with objects.

On Mon, Nov 14, 2011 at 8:16 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

> (I'm going to write this up as a strawman, this list gets first shot at
> it...)
>
>
> Introduction
>

[snip]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111115/79ed276d/attachment.html>


More information about the es-discuss mailing list