Prototypes as the new class declaration

Juan Ignacio Dopazo dopazo.juan at gmail.com
Sat Jun 18 12:51:50 PDT 2011


I see the value in the <| operator in that it deals with any object. But I
think the prototypes as classes idea is focusing on creating an object that
describes a prototype and creating a constructor under the hood. This
functionality can already be implemented in ES5 (see
https://gist.github.com/1033258). It is pretty much what frameworks are
doing today with different names for Function.create (new Class,
Class.create, dojo.define, etc).

However, isn't it the idea of classes to have a simple way of declaring
instance, prototype and constructor properties (and make some of those
private) in a single syntactic structure?

Juan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110618/f8a638d6/attachment.html>


More information about the es-discuss mailing list