News for hackers. Stuff that matters.
Re:Software Engineering at Google (2017) by BeetleB on Friday January 04, 2019 @05:13PM (#18828190)
A better solution is "Just don't couple the two pieces of code!"

It takes a fair amount of work to design a good class where one can easily apply the open-closed principle. And one should where it's needed. But tying together two completely unrelated parts of your code base with such a class just because the two pieces of code are almost identical is the wrong approach. Then going ahead and designing it for the open-closed principle merely adds complexity.

There are no comments on this comment yet.