Timeline for "Prefer composition over inheritance" - Is the only reason to defend against signature changes?
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 25, 2017 at 16:06 | comment | added | JimmyJames | @Casey I'll grant that. Inheritance is useful when used appropriately. It just doesn't scale well. Over time, I've come to limit to one level of (concrete) inheritance, maybe two in rare cases. Beyond that, composition is indicated. | |
May 25, 2017 at 14:31 | comment | added | Casey | OK, sure. But, as with inheritance, there are advantages to the other approach too, which is why it is still commonly used. | |
May 25, 2017 at 12:06 | comment | added | marstato | @Casey and i hate that they doo. Using things like a laptop or one of the TV sticks Branded G****e or A****n would do the job Just as well.... | |
May 24, 2017 at 20:13 | comment | added | JimmyJames | @Casey Because obviously, there will never be another technology that will supersede this one, right? I'll wager that any of those TVs also support inputs from external devices just in case someone wants to use something else without buying a new TV. Or rather, few educated buyers are willing to purchase a TV that lacks such inputs. My premise isn't that these approaches don't exist and neither would I claim inheritance doesn't exist. The point is that such approaches are inherently less flexible than composition. | |
May 24, 2017 at 20:09 | comment | added | JimmyJames | @JAB Right. The statement "Have you ever seen one of those TVs that had a VCR player built-in?" implies they exist. | |
May 24, 2017 at 20:07 | comment | added | Alexander | @JAB And none of them can have their DVD player sold to help buy a Bluray player | |
May 24, 2017 at 18:58 | comment | added | Casey | @JAB and many (most?) TVs sold today support streaming, for that matter. | |
May 24, 2017 at 18:39 | comment | added | JAB | There were plenty of TVs with VCR and DVD players built in in the late 90s and early 2000s. | |
May 24, 2017 at 14:52 | history | answered | JimmyJames | CC BY-SA 3.0 |