|
|
|
|
|
by unwind
1495 days ago
|
|
That is of course true, but it's a pretty poor example since both languages need one line of code for the loop header. The C line is more complex and less abstract, but that doesn't affect the lines-of-code metric that was being used in the discussion. |
|
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.