Comment by int_19h
2 days ago
> you can't fall through on the Ada equivalent of a switch statement (select..case).
C is actually more of an odd one here, and the fallthrough semantics is basically a side effect of it being a glorified computed goto (with "case" being literally labels, hence making things like Duff's device a possibility). Coincidentally, this is why it's called "switch", too - the name goes back all the way to the corresponding Algol-60 construct.
No comments yet
Contribute on Hacker News ↗