Comment

Comment by Patient0

"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...)

parent Patient0 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton