Commanding Chaos for Coworking, Open Source and Creative Communities

Beyond Abstract classes | GarfieldTech

Thu, 09/25/2014 - 12:05 -- rprice

Traits: Just gimme the codez Enter traits. Traits don't imply a relationship. They're purely code reuse. At runtime, traits no longer exist. They say nothing about an object that uses them, how they behave, what you can do with them, or anything else. They are purely code reuse. In that sense, they are completely orthogonal to interfaces; whereas an interface is purely interface reuse, a trait is purely code reuse.