what do TypeScript folks think about this? To me it looks like I can drop the polyfill (1) until a meaningful `toMethod` exists in ES5
Reading through, I missed the part the super binding could have been redefined in any case. I still will very appreciate an example ... maybe even an abstract one that talks about real-world scenarios, thanks. (1) https://github.com/WebReflection/object-mixin#object-mixin On Tue, Dec 3, 2013 at 11:29 AM, Allen Wirfs-Brock <[email protected]>wrote: > > On Dec 3, 2013, at 11:08 AM, Domenic Denicola wrote: > > Perhaps it would be helpful if someone showed how to implement > Object.mixin using Function.prototype.toMethod? > > > I don't have the time right now, but as a rough approximation take the > most recent specification of MixinProperties (which is the guts of > Object.mixin) > http://people.mozilla.org/~jorendorff/es6-draft.html#sec-mixinproperties and > rewrite in in JS. Replace each call of RebindSuper(x,y) with > x.toMethod(y). Replace each call of SameValue(GetSuperBinding(x), source) > with (typeof x === "function"), > > Allen > > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

