What is the difference between Mixins and Traits?
According to Wikipedia, Ruby Modules are sort of like traits. How so?
These pages explain the difference in the D Programming language.
http://dlang.org/mixin.html
http://dlang.org/traits.html
Mixins in this context are code generated on the fly, and then inserted at that point in code during compilation. Quite handy for simple DSLs.
Traits are compile-time external values (rather than code generated from an external source). The difference is subtle. Mixins add logic, Traits add data such as compile-time type information.
Don't know much about Ruby, but hope this helps somewhat.