Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is mixin considered a design pattern?

Are mixins considered a design pattern? Structural?

like image 278
4thSpace Avatar asked Feb 12 '09 21:02

4thSpace


1 Answers

They're a language feature. A "pattern" is different from a feature, in that it resolves a set of forces that may influence a situation in contradictory ways. Features, by their presence or absence, tend to create the forces that patterns resolve. Many design patterns (Double Dispatch is a good example) came about to work around language limitations (in this case method dispatching on a single argument).

like image 54
Morendil Avatar answered Sep 23 '22 03:09

Morendil