Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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#.


I 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.


Very good point. Thanks for pointing that out!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: