Composition over inheritance: Difference between revisions

Content deleted Content added
Benefits: Citation needed.
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Cn}}
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]]<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> and [[Rust (programming language)|Rust]]{{cn|date=December 2021}}, use type composition exclusively.
 
==Drawbacks==