For how rarely used "continue" is, four extra characters don't much matter. The time savings from not having to check the documentation to confirm what the keyword is will outweigh four characters of typing.
Erik
On 4/26/2013 6:40 AM, Benjamin Striegel wrote:
> why is "continue" spelled "loop" in Rust?

"continue" violates Rust's six-character policy, and the original keyword, "cont", was undesirable for obvious reasons. Considering how rarely-used it is (there are eight uses in the whole compiler), the decision was made to simply reuse "loop" and save a keyword.


On Fri, Apr 26, 2013 at 3:45 AM, Erik S <sw...@earthling.net> wrote:
On 4/25/2013 10:53 AM, Patrick Walton wrote:
I'm not sure we can do the latter. There are too many issues relating to `unsafe`, `loop`, the `self` argument, etc. to make the LL(1) derivable from the human-readable grammar in an automated fashion, in my eyes.
Total bikeshed... but why is "continue" spelled "loop" in Rust? Especially if it's causing problems? Rust is the only language [1] that uses "loop" to mean "continue". It seems like an arbitrary incompatibility with C/C++/Java/JS/etc.

Erik

[1] http://rigaux.org/language-study/syntax-across-languages/CntrFlow.html#CntrFlowBrkCntFlo

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev




_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev


_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to