Composition over inheritance: Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile web edit
Line 233:
Composition relation is more flexible as it may be changed on runtime, while sub-typing relations are static and need recompilation in many languages.
 
Some languages, notably [[Go (programming language)|Go]],and Rust use type composition exclusively.<ref>{{cite web |url=https://commandcenter.blogspot.com/2012/06/less-is-exponentially-more.html |title=Less is exponentially more |last1=Pike |first1=Rob |date=2012-06-25 |accessdate=2016-10-01 }}</ref>
 
==Drawbacks==