Prototypes as the new class declaration

Axel Rauschmayer axel at rauschma.de
Mon Jun 20 03:25:20 PDT 2011


>> It seems to me it would occur when in an ObjectLiteral where a function expression is assigned as the initial value of a 'constructor'-named PropertyAssignment.
> 
> correct, whatever magic there is occurs as part of defining a "constructor" property as part of an object literal.  However, such things could still be wired up manually (most likely by somebody wanting to create procedural abstractions for class-like definitions.

Are you thinking along the lines of the following example?
    var MyClass = class({ ... });


-- 
Dr. Axel Rauschmayer

axel at rauschma.de
twitter.com/rauschma

home: rauschma.de
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110620/76875909/attachment-0001.html>


More information about the es-discuss mailing list