Re:Using the switch(true) pattern in JavaScript
by throwanem on Monday April 12, 2021 @07:29PM
(#26786430)
Of course, you can't evaluate prose in a REPL and see for yourself what it does.
I agree that overly clever code is always to be avoided. But is this really overly clever? I wouldn't expect an engineer early in their career necessarily to understand on sight what it does. But I might worry a little for one who couldn't figure it out through experiment.
I agree that overly clever code is always to be avoided. But is this really overly clever? I wouldn't expect an engineer early in their career necessarily to understand on sight what it does. But I might worry a little for one who couldn't figure it out through experiment.