On Sat, Oct 29, 2011 at 4:34 PM, Axel Rauschmayer <[email protected]> wrote:
> http://wiki.ecmascript.org/doku.php?id=harmony:object_extension_literal_class_pattern
>
>    const className = superClass <| function(/*constructor parameters */) {
>        //constructor body
>        super.constructor(/*arguments to super constructor */);
>        this.{
>         //per instance property definitions
>        };
>    }.prototype.{
>        //instance properties defined on prototype
>    }.constructor.{
>        //class (ie, constructor) properties
>    };

I totally appreciate Allen's effort to build coherence around the
operator-to-be-named-curiously triangle.

For me this form is confusing compared to a class-based language.  A()
should construct A-s, A.foo() should be a method of A-s.
Prototypical classes should have a prototype as their super class.

But here we have a .prototype defining instance properties. I guess
every JS dev is puzzled by .prototype already. Compared to a class
language, it seems like a hack. Do we really need it?

I'd love to see a riff on Gozala's selfish with the declarative
approach. Maybe the gap is too large.

jjb
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to