Note that the way mixins generally work in languages with first class support for them is with multiple inheritance. That is, mixins are included by reference and, in a dynamic language, changes to the mixin affect objects that have already been extended.<p>JavaScript can't do multiple inheritance and so you have to hack mixins by copying. This sucks when you want to e.g. extend an Enumerable mixin because.. well, you can't.
This post inspired me to try and create the mixin pattern in C# with interfaces, extension methods, and optional generics. Probably been done before, but meh, here's the result: <a href="http://pastebin.com/ZiddNDSi" rel="nofollow">http://pastebin.com/ZiddNDSi</a>