Hacker News new | ask | show | jobs
by tialaramex 1502 days ago
Fair, it was the first example of a verbose C idiom that came to mind, and it will spill onto multiple lines for complex cases easily (depending on your style rules) but it isn't a good example for this purpose.

I did also think about switch versus match, but in that case you're more or less obliged to do the extra lifting when translating to Rust and so I expect the breaks (which are extraneous in match) would be elided rather than translated.