3 ms·
A switch creates multiple possible code paths. Combine it with other switch statements and the possible code paths grow geometrically. That is certainly true,
by Silhouette 10y ago
A switch creates multiple possible code paths. Combine it with other switch statements and the possible code paths grow geometrically.
That is certainly true, but it is equally true of any mechanism for making those decisions. With some mechanisms, like if-else and switch-case, the decisions are explicit. With others, like virtual function dispatch, the decisions are implicit. Either way, the decisions are still being made and the combinatorial properties of multiple decisions are still the same.