News for hackers. Stuff that matters.
Re:Inheritance Often Doesn't Make Sense by c22 on Saturday March 17, 2018 @10:39PM (#16610235)
> You have destroyed only an abstract quality, it's squareness, not the thing.

Here we are in agreement.

> But we're talking about an object in computer memory that's an instance of a square or a rectangle, or about some physical thing that is one or the other shape.

Everything in a computer program is an abstraction, and of course you can arrange these abstractions however you like. You could create an instance of a Square that inherits from Paper and has dimensions of "A8". I'm merely arguing that when building an object whose shape may change, using a PastryDough class is probably preferable to using one called Square.

There are no comments on this comment yet.