Andrea Giammarchi (2013-04-15T05:23:17.000Z)
github at esdiscuss.org (2013-07-12T02:26:59.456Z)
not sure changing name is a thing to promote, it makes method name clashing easier but it can be achieved simply attaching properties to a specific object and then pass that as mixin ... ```js Object.mixin(target, { on: source.addEventListener, off: source.removeEventListener, has: source.hasEventListener, trigger: source.dispatchEvent }); ``` As you see there's no need to make the signature more complex with aliases, it's straight forward to do the same, of course if those descriptor are meant to be (enumer|configur|writ)able: true) Agreed on Trait naming convention, but these can be represented only via Functions in JS. However, describing them as "not exactly common function" would result in a better understanding. So here the API, and the name I am afraid has always been abused in JS but is known as "mixin" ```js // basic signature Object.mixin( target:Object, source:Object ):target // one overload Object.mixin( target:Object, source:Trait [,args:Array|Arguments] ):target ``` This is probably even better than needed/horrible slice call and arguments.length check per each mixin invocation with Traits ... so, what do you think ?