4 ms·
> 3. Not everyone prefers the "curly braces and semicolons" style of systems languages, and so they feel the <>s and ::s and {}s and ;s are noisy. We kept this
by asdkhadsj 7y ago
> 3. Not everyone prefers the "curly braces and semicolons" style of systems languages, and so they feel the <>s and ::s and {}s and ;s are noisy. We kept this style to be familiar to systems programmers.
Oh boy do I agree about the noise. I absolutely love Rust, and I definitely don't think it's noisy (in normal examples) but before I first learned Rust generic code feat like syntax soup. It seemed bizarrely messy and convoluted.
Mind you, I love Rust now. This is not a criticism towards Rust. It's simply a reflection on how a non-Rust programmer, largely non-Systems programmer saw Rust's flavor of syntaxes for Generics and Lifetimes.
How time flies. Now I push Rust at work where it makes sense and use it for everything in my personal (code) life.
My favorite part? Likely how it feels imperative while still offering functional features. Iterators, for example, are my favorite thing in the world. This is partially due to system shock I'm sure; the idea of iterators to this old Go programmer feels like magic haha, it was quite the change coming from Go.
- 0815test 7y ago> Oh boy do I agree about the noise. I absolutely love Rust, and I definitely don't think it's noisy (in normal examples) but before I first learned Rust generic code feat like syntax soup. What's the alternative? Text-based syntax ala Pascal/Ada is actually noisier than symbol- and short-keyword-based, because you don't ever get to file the "syntax" parts away as you become familiar with them; you have to process them visually every time you read that code. There may be a case for that sort of overly-verbose syntax as a form of literate programming - an introduction meant for users who are as of yet unfamiliar with any given system; but as an everyday practice it's quite painful!
- dual_basis 7y agoSignificant whitespace a la Python. When I first started learning Python I hated the idea of significant whitespace, now I think it is the best thing ever.
- 0815test 7y agoUsing rustfmt consistently will get you basically 90% of the way towards the "Pythonic" benefits of significant whitespace. On the other side, having lexical block nesting be controlled by an explicit pair of characters { } is a pretty significant advantage, particularly so for Rust where placing a bit of code in its own block can have rather significant implications of its own!
- dorfsmay 7y agoI'm the other way around. When I started with Python I instantly fell in love with "format is the syntax". A few format bugs later (people changed code and didn't push/pull a block, or merged two blocks by mistake), and using autoformatters, and now I wish Python used another mechanism.