Andrea Giammarchi (2015-02-12T18:27:18.000Z)
this thousand times ... Traits as class makes no sense to me indeed and
Mark example shows plain objects passed as Trait.create ... that works just
fine, except some trait initialization, which should not be a constructor,
could be used too.

Is there any other language that uses same classical OOP classes as traits
too? It really does not feel right to me.

Btw, reason I'm asking is because somebody else asked, I'm really OK to not
rush and wait to see how it goes when it's the right time.

Best Regards

On Thu, Feb 12, 2015 at 6:32 PM, Luke Scott <luke at cywh.com> wrote:

>
> On Feb 12, 2015, at 8:35 AM, Andrea Giammarchi <
> andrea.giammarchi at gmail.com> wrote:
>
> Without going down full specification/implementation details, does anyone
> believe that classes should/could be used, in the future, as traits/mixins
> too?
>
> I find that an anty pattern.
>
> I think traits should be just plain objects with an initializer or some
> special object flagged as trait and I'd rather leave inheritance and
> classes features outside this future feature.
>
> Thoughts? Thanks!
>
>
> I would agree with that. I had a trait implementation that used classes as
> traits, and it caused a lot of problems, especially since classes have
> constructors. Traits should not have constructors. I have since updated my
> implementation to use plain objects.
>
> This is what I am using now:
> https://gist.github.com/lukescott/36453a75c39c539f5c7d
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150212/53562cef/attachment.html>
d at domenic.me (2015-02-17T20:23:47.393Z)
this thousand times ... Traits as class makes no sense to me indeed and
Mark example shows plain objects passed as Trait.create ... that works just
fine, except some trait initialization, which should not be a constructor,
could be used too.

Is there any other language that uses same classical OOP classes as traits
too? It really does not feel right to me.

Btw, reason I'm asking is because somebody else asked, I'm really OK to not
rush and wait to see how it goes when it's the right time.