4 ms·
It's hard to imagine how they would go from discussing the conundrums of whether-to-use-braces-or-indentation, to discussing the merits of efficiency + memory s
by Dewie 12y ago
It's hard to imagine how they would go from discussing the conundrums of whether-to-use-braces-or-indentation, to discussing the merits of efficiency + memory safety.
Though I guess they could have chosen to bring up the peculiar meaning of the semicolon in Rust.
- bjz_ 12y agoThe semicolon as a statement separator is such a lovely thing that it would be hard to imagine Rust without it. It's sad to see that Swift and Go have gone with a statement based approach as opposed to emphasizing the composition of expressions. They feel very clunky in comparison.
- Animats 12y agoThe semicolon as a statement separator is such a lovely thing... That particular convention goes back to ALGOL-58. In ALGOL-58, semicolon is a statement separator. See page 14 of the ALGOL-58 report: http://www.softwarepreservation.org/projects/ALGOL/report/Algol58_preliminary_report_CACM.pdf http://www.softwarepreservation.org/projects/ALGOL/report/Al... C goes the other way, with semicolon as a statement terminator. 56 years after ALGOL-58, we still don't have convergence on this. Wikipedia has a table: https://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28syntax%29#Statements https://en.wikipedia.org/wiki/Comparison_of_programming_lang...
- bjz_ 12y agoOh interesting, I didn't know that ALGOL had that. Looking through the Wikipedia pages, it seems that Rust most likely gained it via the ALGOL->ISWIM->ML->Ocaml->Rust route. I hope it catches on in more imperative languages in the future. After using it for a while, statement terminated syntax feels so clunky in comparison. I love being able to break out into a block like: let foo = { /* do stuff */; some_expression };