Sounds like it was just what was needed at the time and worked better/longer than most abstractions.
Sounds like it was just what was needed at the time and worked better/longer than most abstractions.
The problem I've seen often in codebases is that as an abstraction or pattern grows more unwieldy, they don't take the time to update it.
They often don't get revisited until they're so bad that they can't be ignored.
Handling a something with a switch or if/else is fine if there's only 2 or 3 options, but people will often just keep piling on. When it's 10 things, changing it becomes much more work so people will continue to add to it. Then when it breaks at 20 things, someone will come in and say "Why did we write it this way in the first place? It doesn't make any sense!"
I'm often torn between pragmatically writing the simplest code possible and being proactive about abstracting early to prevent an eventual breakdown of the pattern.
Often, writing more cases into a switch statement is way easier and less boiler-plate-y than abstracting it out to subclasses or a dictionary or whatever.