|
|
|
|
|
by Patient0
762 days ago
|
|
"Students tend to understand objects better" -> I actually a disagree. A problem is mutability. Consider: "Is-a list of triangles a list of shapes?". Most inexperienced people, using their intuition, would answer "Yes!", and try to design a "ShapeList" base class of "TriangleList", "CircleList", "SquareList"... and then puzzle over where to put the method "void add(Shape s)". So you end up picking a subset of OO in which you take away inheritance, or mutability ("state"). But take those away and you don't really have OO any more (IMO)... Even Eiffel got this wrong, fwiw. (https://staffwww.dcs.shef.ac.uk/people/A.Simons/research/pap...) |
|