Re: Strangest language feature
by niggler on Sunday March 24, 2013 @07:45PM
(#5434396)
I wouldn't necessarily call this strange if you think about how this directly translates to assembly instructions.
[ Parent
| on HN ]
It's pretty strange nonetheless that it compiles at all. Underlying it is that a switch statement isn't a proper control structure but syntax sugar for goto.
while() loops are really syntax sugar for goto too. And whole C is arguably just a syntax sugar for assembler :) That's why we use it.