The one thing I don't get about rust

IMHO, if an experienced programmer has to spend more than a week (a rough estimate) to read about and at least once use every feature of the language correctly, I'd say this language is pretty big. Lifetimes & borrowing is a pretty big and time-consuming feature in itself. The "size" of a programming language is about not just the quantity of features, but their complexity too. Sure, some of the complexity can be dealt with in the compiler, like match ergonomics and NLL, but the rest has to constantly circulate in your mind and tire it.

Rust has grown in past years, and not just in quality, but in complexity too. Some of the complexity is hidden behind crate attributes in nightly, but some features are already being used to implement stuff in stable, so they count as well. In my opinion, it's better to move fancy stuff like autocloning to crates, if possible, to keep the language uncluttered. Only the features that become de-facto standards or/and bring huge benefits should be carefully considered for inclusion to the language.

5 Likes

I would definitely say Rust is a complex language, no doubt. But I wouldn't say it is a big language. Perhaps that is a distinction without a difference as far as learnability goes, but I was responding to the specific statement from ssokolow regarding the adding of new keywords. I wanted to point out that as far as keyword count goes, C# is much bigger.

I certainly don't think keywords should be added without due consideration and I am not advocating adding anything at all, just making an observation.

1 Like

I have started following the convention of using UCFS notation for RC/Arc: Arc::clone(foo). This way the difference in code is clear between “I'm copying a cheap data”, “I'm cloning a reference” and “I'm actually doing an expensive clone here”. There is a clippy hint to enforce this.

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.