3 ms·
I think the point was that even within the codebase, simplicity and reduced complexity was preferred over perhaps a "cleaner" or more advanced approach. So man
by sbarre 6y ago
I think the point was that even within the codebase, simplicity and reduced complexity was preferred over perhaps a "cleaner" or more advanced approach.
So managing a bunch of hard-coded code paths via a switch instead of using a regex to pattern-match.
It's less future-proof, but even an entry-level dev can reason about a switch statement and update it as needed.
- kradroy 6y agoThis is exactly it. The nuances of regex patterns can be misconstrued. Obviously if the regex used for flow control cannot be sensibly translated to more traditional conditional statements, then they are permitted. Even in that case, the "simplest" regex was preferred.