rust-lang / prev.rust-lang.org

The previous Rust website. The current website's code is at https://github.com/rust-lang/www.rust-lang.org.
https://prev.rust-lang.org
Apache License 2.0
153 stars 340 forks source link

Document in the FAQ why Rust doesn't have "automatic semi-colon insertion" like JavaScript does #1227

Open Centril opened 5 years ago

Centril commented 5 years ago

See title.

In any case, the semi-colon in Rust is significant, sometimes in subtle ways (e.g. rust-lang/rust#54782). I don't foresee a change like this being adopted. The only reason I haven't just closed this issue is that I am wondering whether we have a standard spot in the docs explaining why Rust doesn't use something like "automatic semi-colon insertion" like what JavaScript does? If we do have a FAQ entry or some other similar standard reference, I'd like to know what it is. And if we don't, we should add one, right?

cc https://github.com/rust-lang/rfcs/issues/2583#issuecomment-435525274