Object-Oriented Programming

Mixin

English

Overview

A technique for incorporating functionality into multiple classes, separate from inheritance.

Details

A mechanism that lets common functionality be woven across multiple classes while sidestepping the constraints of single inheritance. It's often implemented via language features like Ruby's modules or traits, gaining reusability while avoiding the complexity (the diamond problem) of multiple inheritance.

More Programming terms