4 ms·
Odd syntax choices. The ones that stand out for me are "enum class" for scoped enums, and ":" as the delimiter in switch statements. It doesn't seem really well
by harpiaharpyja 3y ago
Odd syntax choices. The ones that stand out for me are "enum class" for scoped enums, and ":" as the delimiter in switch statements. It doesn't seem really well thought out.
- nine_k 3y agoI frankly find the whole idea of the switch statement unfortunate. The switch statement in C has a really understandable compiled representation: linear code where you can jump into in the middle. It was fine in 1970. But in 2023 I'd expect introduction of pattern matching instead, which generalizes the idea much better. Python pulled this off successfully. Java pulled it off successfully. Lua could, too.