2 ms·
I am not a fan of this design in a low level language. The first version of switch does exactly one thing and is very clear. The second now is forcing me to thi
by norir 1y ago
I am not a fan of this design in a low level language. The first version of switch does exactly one thing and is very clear. The second now is forcing me to think both about branching logic and control flow. I understand the surface level appeal of the syntax, but if I encountered code written with this feature in the wild, I would think something must have gone wrong in the program design.
- throwawaymaths 1y agoi think hlls sometimes distinguish between these situations with a different keyword.
- lerno 1y agoIt's very simple, the latter describes an `if-else` chain. No more complicated than that. Can you explain what your concern is?