Re:Using the switch(true) pattern in JavaScript
by cryptonector on Monday April 12, 2021 @04:07PM
(#26784483)
It's like "goto considered harmless" -- structured code to max, to the point of unreadability. Dogmatism has drawbacks.
Re:Using the switch(true) pattern in JavaScript
by jbverschoor on Monday April 12, 2021 @03:41PM
(#26784160)
Same here.
Returning and throwing quickly and strict.
I much preferred (and still greatly prefer in industry) the pattern of exiting the function as soon as possible.