News for hackers. Stuff that matters.
Re:Goodbye, Clean Code by scarface74 on Tuesday January 14, 2020 @10:18AM (#22045478)
If all seven are the same except for one or two cases, it doesn’t mean that you have to have a bunch of if statements, you either use inheritance or composition to create special cases and judiciously apply “pull members up” and “push members down” refactoring, interfaces, abstract classes, virtual methods, etc. These are all solved problems.

Yes I know about the whole “a square is not a rectangle problem”.

There are no comments on this comment yet.