Re: Why can’t for-of be applied to iterators?

Andrea Giammarchi andrea.giammarchi at gmail.com
Tue Jun 11 13:36:39 PDT 2013


I personally +1 that but most likely they'll come back saying there is no
time for that ... Object.mixin hasn't even been discussed in details ...
however, it's in current ES6 draft so once that is defined, maybe it will
be quick and easy to add mixin in the class? let's see


On Tue, Jun 11, 2013 at 1:26 PM, Brian Di Palma <offler at gmail.com> wrote:

> Sorry for the OT message.
>
> On Tue, Jun 11, 2013 at 6:22 PM, Andrea Giammarchi
> <andrea.giammarchi at gmail.com> wrote:
> > We don't have interfaces ... I know, we could have mixins though,
> compatible
> > with @@things too.
> >
>
> The concepts of Mixins has cropped up before in discussions and is
> used in current JS code ( EventEmitter ).
> I was wondering if it was possible to codify it in ES6 or is there
> simply no bandwidth/time for that?
>
> class MyClass extends MySuper mixin EventEmitter, Iterable {}
>
> Seems the sensible way to add it to the class syntax and it means you
> can still subtype and not use your one and only
> code-reuse slot ( extend ) for what is a mixin.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130611/ef3dd8d4/attachment.html>


More information about the es-discuss mailing list