4 ms·
> "ret" [is] annoying and gratuitous differences. C/C++, Java, Python, JavaScript, and I think Perl/Ruby/Go all use [...] "break" `ret` is a non-local return,
by masklinn 15y ago
> "ret" [is] annoying and gratuitous differences. C/C++, Java, Python, JavaScript, and I think Perl/Ruby/Go all use [...] "break"
`ret` is a non-local return, it's got nothing to do with `break` (which is a local return and the usual" break).
Also, `ret` is in line with the (unfortunate I think) systematic shortening of keywords in Rust: `fn`, `ret`, `mut`, `alt`, ...
And as p4lindromica notes, Ruby's `continue` is called `next`.