4 ms·
> So you try to extract that boilerplate into a method, and it’s fine until the very next change. Then you need to start passing options and configuration into
by rileymat2 6y ago
> So you try to extract that boilerplate into a method, and it’s fine until the very next change. Then you need to start passing options and configuration into your helper method... and before long your helper method is extremely difficult to reason about, because it’s actually handling a dozen cases that are superficially similar but full of important differences in the details.
What if the flaw is not the initial deduplication, but the flaw was to continue to use it by adding additional responsibilities?
When I think of the incidental type, I think of things that just happen to be alike, a contrived example would be ENUM value that happens to be 3 used in different places ands that works because both happen to use 3.