2 ms·
Both of those statements can be true, though. Switch-case statements are widely accepted in industry, yet some developers disagree with their use. In my opini
by ycombobreaker 10y ago
Both of those statements can be true, though. Switch-case statements are widely accepted in industry, yet some developers disagree with their use. In my opinion, it's hard to beat a jump table for some operations, which a switch block neatly performs. And there's a rational continuum between boolean conditionals, multi-state (>2) conditionals, and polymophism, such that i think "some people"'s assertion sounds like throwing out the baby with the bathwater.