3 ms·
Most C-inspired languages (most popular programming languages) allow this. The only ones I've used that don't are Go and Swift. And I find it a little annoying.
by alexvr 12y ago
Most C-inspired languages (most popular programming languages) allow this. The only ones I've used that don't are Go and Swift. And I find it a little annoying.
If you're worried about bugs, there are other things in C/C++ to criticize first ;)
- desdiv 12y agoIt's true for Rust as well. What these three languages have in common is that they don't require parentheses around the switching boolean expression, and when you have things like: if expression1 expression2 it can be fiendishly hard to determine the boundary between expression1 and expression2.