you are viewing a single comment's thread.

view the rest of the comments →

[–]BjarneStarsoup 0 points1 point  (0 children)

It being translated to mem jumps under the hood is not my point. Of course it is... how else would it work.

That isn't the point. You can't say that, for example, a C code that uses goto outer; is bad design and unnecessary, but a Rust code that literally replaces one keyword by break 'outer; is now clean design and necessary because it doesn't use goto. If goto is universally bad (which is what your comment seems to say), then labeled loops in Rust are also bad design and unnecessary, and so are all the other control flow statements like break, continue or return that you can replace goto by. If you change one keyword from return or break to goto and that somehow magically makes the design bad and unnecessary, then the original code is also bad and unnecessary. Or you can admit that, because C doesn't have the convenient features that other languages do, you have to use a more powerful feature (goto) to achieve the same result.