Re:Using Rust at a Startup: A Cautionary Tale
by zozbot234 on Wednesday November 23, 2022 @05:14AM
(#33717305)
Surface syntax is the most subjective aspect of a programming language, but Rust uses just a few symbols in a very consistent way. It's nothing like Perl. The indentation rule is nice for small examples, but it tends to break down in cases that are even slightly complex. Which is why, e.g. Haskell can use semicolons and curly braces as an alternative.
Re:Using Rust at a Startup: A Cautionary Tale
by insanitybit on Wednesday November 23, 2022 @11:25AM
(#33721197)
In terms of parsing, sure, Python may be slightly simpler. In terms of mentally interpreting the code? Absolutely Rust wins.
Re:Using Rust at a Startup: A Cautionary Tale
by drogus on Wednesday November 23, 2022 @02:46PM
(#33723659)
Being able to understand the syntax and by implication being able to understand a single piece of code in front of your eyes doesn't mean you will understand what it actually does. If you're talking about a small piece of code mainly using well known APIs, maybe you will understand it perfectly. But with code calling custom functions in a big codebase? Even when looking at a simple function call in a class:
- if it calls a function on `self`, where is it actually implemented?
- if you pass arguments, can they be mutated?
- can the function throw an exception?
you can't really answer this questions easily and I would argue answering them in Rust is much easier. Also because tooling for statically typed languages can derive much more than for dynamically typed languages.
You know what Rust looks like to me? Perl without the dollar signs. There's your write-only language, you just have it backwards.