|
|
|
|
|
by parpfish
261 days ago
|
|
i've been beating the drum for a long time that we teach OO programming wrong. we always start with inheritance (Car is subtype of Vehicle; Cat is subtype of Animal). we need to teach encapsulation as the primary use for OO. ime, the most effective way of using "OO" in practice is that you define data classes for different entities and then affix a few fancy constructors that let you build entities out of other entities. inheritance rarely gets used. |
|