From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Benjamin Gruenbaum
> We have `Object.assign` that works fantastically for most classic trait use > cases. Well, actually, it works extremely poorly. The old (now dead or deferred) `Object.mixin`, once called `Object.define`, is a better fit. But it still fails to account for a couple things, off the top of my head: - Being able to add custom initialization logic to the class constructor when "mixing in" a trait. You can construct a custom protocol around this, but (a) that means the class you're mixing in to needs to be aware of the protocol; (b) everyone needs to agree on a protocol across the ecosystem. - Pretty much anything to do with private state doesn't work anymore. _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss