Re:Rust Cookbook
by jolux on Thursday February 11, 2021 @10:22AM
(#26102375)
Swift and Go don't have either. Neither does Kotlin. The difference is that Rust is an expression language (much like ML), and the semicolon determines whether the resulting expression is returned or thrown away. OCaml needs semicolons when you're doing imperative programming too.
[ Parent
| on HN ]
Re:Rust Cookbook
by johncolanduoni on Thursday February 11, 2021 @10:47AM
(#26102811)
Swift, Go, and Kotlin all take newlines into account. I guess one could have a definition of “significant whitespace” that excludes that but in any case I strongly suspect that’s what they were referring to.