I can relate about OP’s comment about OOP. On a similar note, I had written about re-discovering visitor pattern:
https://ssg.dev/are-interfaces-code-smell-bd19abc266d3/
That blog post is a poor example. It replaced a simple straightforward if-else loop with a hard to understand abstraction spaghetti. A few unit tests and you'd be well on your way to shipping rather than messing around with beautiful patterns.
That blog post is a poor example. It replaced a simple straightforward if-else loop with a hard to understand abstraction spaghetti. A few unit tests and you'd be well on your way to shipping rather than messing around with beautiful patterns.