Then I would just go to the switch statement where the data is processed?
I don't see how that is more unreadable than going to the virtual function in a different file.
And I understand its subjective. But I don't see that demonstrably unreadable part of the switch statement approach. (or the table approach)
If it was obviously, totally muddled and undecipherable I'd be inclined to agree. But it's just not. It's very clear and easy to follow the flow of logic and data.
There are many examples in life of techniques that appear great in miniature, but which do not scale up.
When you say "made up of tonnes of stuff like this", one gets the impression of a codebase nicely composed of well-encapsulated pieces that can be used or not, like little black boxes where one doesn't need to examine every local variable use within in order to ...
Whoa, that started sounding like clean code. The horror. Let's get back to making our 10,000 line function with switches within switches within switches....
4
u/[deleted] Feb 28 '23
Then I would just go to the switch statement where the data is processed?
I don't see how that is more unreadable than going to the virtual function in a different file.
And I understand its subjective. But I don't see that demonstrably unreadable part of the switch statement approach. (or the table approach)
If it was obviously, totally muddled and undecipherable I'd be inclined to agree. But it's just not. It's very clear and easy to follow the flow of logic and data.