News for hackers. Stuff that matters.
Re:Anti-If: The missing patterns (2016) by hellofunk on Wednesday June 27, 2018 @11:39AM (#17409034)
> especially the same pattern of branching in several places - then you should certainly consider replacing that with polymorphism

As a first step, I'd say better to just isolate the branching in one place, as a separate function, rather than immediately jump to polymorphism which could have high refactoring costs in some cases (even if it might eventually be worth it).

Because premature abstraction is just as bad as premature optimization.

There are no comments on this comment yet.