3 ms·
> Despite the invalid example, the point still stands. Put arbitrary Rust against Python or Typescript and you'll see it immediately. Eh, I don't think that is
by Ygg2 3y ago
> Despite the invalid example, the point still stands. Put arbitrary Rust against Python or Typescript and you'll see it immediately.
Eh, I don't think that is fair, Rust even at best of times will have concepts like lifetime/references that Python and TS can just ignore and are thus "simpler".
A much better comparison would be something like https://matklad.github.io/2023/01/26/rusts-ugly-syntax.html https://matklad.github.io/2023/01/26/rusts-ugly-syntax.html.
> and do away with snake_case.
That's seem counterproductive - according to: http://www.cs.kent.edu/~jmaletic/papers/ICPC2010-CamelCaseUnderScoreClouds.pdf http://www.cs.kent.edu/~jmaletic/papers/ICPC2010-CamelCaseUn....
I.e. you would do with most readable part of syntax.
- weinzierl 3y agoBefore Rust everybody[1] seemed to believe we cannot have a safe and natively compiled language. Rust proved the opposite. I don't see why we can't have clean, low noise, high signal syntax in a language like Rust. My criticism is not the syntax that makes the language more expressive - that's essential complexity. I would want the accidental complexity removed, like the somewhat redundant distinction between dot and double colon. And I wish the cognitive load reduced by making the syntax as familiar as possible to as many people as possible. That's the reason I mentioned Javascript and Python - not only is their syntax more concise but also familiar to more people. When it comes to the snake case study, I'm not surprised at all. They did not control for the size each identifier took on the screen. That a bigger signal enables a faster response is common sense. Longer identifiers are easier to recognize but the downside is that they take away space we could use for other important things. That's why most languages keep the most frequent ones (like variable names) short and free from unnecessary noise like underscores. Also the sample size in the study was extremely small. [1] Except the Haskell/ML folks, naturally.
- Ygg2 3y ago> I don't see why we can't have clean, low noise, high signal syntax in a language like Rust. My criticism is not the syntax that makes the language more expressive - that's essential complexity. As I pointed in Matklad's post you need to add those concepts in or devise a way to infer them, side by side comparisson of Rust/JS is meaningless if one has no concept of lifetime or one abstracts details via GC. > Before Rust everybody[1] seemed to believe we cannot have a safe and natively compiled language. I do agree, but you can't avoid all trade-offs. Rust got safe, natively compiled language by increasing type complexity (adding lifetimes and ownership), and adding more sigil noise. If Rust had GC it would be way simpler and way less usefull. > like the somewhat redundant distinction between dot and double colon I don't think it's redundant. But I'm not a Rust compiler guy.