2 ms·
'break' feels ugly, but doesn't 'return' already have a different meaning here? You could do something context sensitive to make 'return' act differently in a
by mikelward 9y ago
'break' feels ugly, but doesn't 'return' already have a different meaning here?
You could do something context sensitive to make 'return' act differently in a switch expression versus a switch statement, but that seems more confusing.
- earenndil 9y ago> You could do something context sensitive to make 'return' act differently in a switch expression versus a switch statement But you shouldn't. That would break existing code. What if you actually want to return something from within a switch statement?
- mikelward 9y agoYou ignored the parts where I said "already has a different meaning" and "that seems more confusing".