On Fri, Oct 21, 2011 at 12:36 PM, Axel Rauschmayer <a...@rauschma.de> wrote:

> In a vein similar to making [] available to collections, one could make
> "new" and "instanceof" available to other inheritance schemes.
>
> For example:
>
> // “Meta-class” for prototypes as classes/instantiable prototypes
> function ProtoExemplars() {}
> ProtoExamplar.prototype.{
>

Has an official strawman been submitted for the "extend" operator? Having
trouble searching for it, but might be using the wrong terminology.
(Editorial: I love this operator)


>    operatorNew(...args) {
>        let inst = Object.create(this);
>        return inst.constructor(...args);
>    },
>    operatorInstanceof(lhs) {
>        return this.isPrototypeOf(lhs);
>    }
> };
>
> --
> Dr. Axel Rauschmayer
> a...@rauschma.de
>
> home: rauschma.de
> twitter: twitter.com/rauschma
> blog: 2ality.com
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to