4 ms·
Every language in the universe prefers composition over inheritance =P
by zanny 13y ago
Every language in the universe prefers composition over inheritance =P
- seanmcdirmid 13y agoNot very true. Some languages prefer inheritance to express is-a relationships and composition to express has-a relationships. Some languages try to shoe horn is-a into being equivalent to has-a, but they usually have trouble expressing non-structural subtyping.
- banachtarski 13y agoThe ones that don't blossom into interface factories which make factory adapters of abstract factories. (I'm looking at you, Java)
- V-2 13y agoFor the lack of a nail, throw new HorseshoeNailNotFoundException("no nails!"); For the lack of a horseshoe, EquestrianDoctor.getLocalInstance().getHorseDispatcher().shoot(); (...) http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom...