3 ms·
I was confused too when I saw this article on Reddit. Turns out that Mixins in D are similar to Macros and not similar to Ruby mixins. Mixins in an object orien
by jetti 14y ago
I was confused too when I saw this article on Reddit. Turns out that Mixins in D are similar to Macros and not similar to Ruby mixins. Mixins in an object oriented sense (such as Ruby) are very similar to interfaces in C#.
- lucisferre 14y agoI wouldn't say that Ruby Mixins are not really similar to interfaces at all, since interfaces represent signature to be implemented by the class and mixins represent implementation. You are correct though that the "mixins" in this article are nothing like Ruby mixins.
- jetti 14y agoVery good point. Thanks for pointing that out!