4 ms·
What about making it optional, like in Haskell?
by Dewie 14y ago
What about making it optional, like in Haskell?
- steveklabnik 14y agoCurrently, lines with and without semicolons have different semantics, so that doesn't work. > Basically, ending an expression in Rust with a semicolon ignores the value of that expression. This is kinda weird. I don't know how I feel about it. But it is something you should know about. http://www.rustforrubyists.com/book/chapter-06.html http://www.rustforrubyists.com/book/chapter-06.html
- Dewie 14y agoYou could still make braces optional though, right?
- steveklabnik 14y agoYou could do whatever you want. The idea is that `rustc --pretty` reformats code, so you could make the input flexible enough to be whatever you want, really. Or write your own transpiler.