On May 20, 2013, at 2:42 PM, Allen Wirfs-Brock wrote:
>
> On May 16, 2013, at 5:11 PM, Dmitry Soshnikov wrote:
>
>> Hey guys,
>>
>> Sorry for the random question (probably it was already discussed).
>>
>> What is a current state having mixins/traits syntax along with a class
>> definition?
>
On May 16, 2013, at 5:11 PM, Dmitry Soshnikov wrote:
> Hey guys,
>
> Sorry for the random question (probably it was already discussed).
>
> What is a current state having mixins/traits syntax along with a class
> definition?
They aren't part of ES6. There have been past discussions about mix
Sure, this abstraction presents in almost any library related with classes
sugar. I'm just curious whether it was even discussed here, and what is
probability it can be included into this spec.
(Or maybe into ES7, no matter much yet; I still excluding the version that
I'm asking a "stupid question
for what it matters, redefine.js already does exactly that.
( https://github.com/WebReflection/redefine#classes )
var Foo = redefine.Class({
extend: Bar,
mixin: [F, object, F2.prototype, Class3]
});
and yes, it makes perfect sense, specially for mixins such EventEmitter and
similar
my 2 cent
On Thu, May 16, 2013 at 2:11 PM, Dmitry Soshnikov <
dmitry.soshni...@gmail.com> wrote:
> Hey guys,
>
>
And sorry for auto greeting mailing-template if it hurts someone ;)
> Sorry for the random question (probably it was already discussed).
>
> What is a current state having mixins/traits syntax
In the simplest way can just desugar to Object.mixin(Foo.prototype,
Mixin1[, Mixin2, .., MixinN); before the class creation (methods of own
class's prototype should override mixins, but not the parent methods).
Although, form I see in the latest draft even Object.mixin(...) is still
under discussio
Hey guys,
Sorry for the random question (probably it was already discussed).
What is a current state having mixins/traits syntax along with a class
definition?
Like:
class Foo extends Bar {
use EventEmitter, CommonMethodsMixin;
...
}
where mixins provided in "use" declarations are simple o
7 matches
Mail list logo