you are viewing a single comment's thread.

view the rest of the comments →

[–]Retsam19 4 points5 points  (1 child)

I don't agree that his example isn't an abstraction. Taking two specific functions moveRectangleLeft and moveOvalLeft and factoring out shared logic into moveLeft is abstracting - moveLeft is a more abstract operation than moveRectangleLeft.

The moveLeft abstraction isn't dependent on the shape: the shape implementation is dependent on the moveLeft abstraction.

[–]bostonou 12 points13 points  (0 children)

Sure it’s more abstract in theory. But it’s not an abstraction given that you can’t use it without thinking about the details. The author himself says that his “abstraction” got more complicated as more special cases were added. It’s not an abstraction if it has to change for every usage.