3 ms·
I just wish it was simpler. I never saw it in its infancy, but from what I can gather, it seems a huge amount of bloat was added to the original design.
by bmitc 4y ago
I just wish it was simpler. I never saw it in its infancy, but from what I can gather, it seems a huge amount of bloat was added to the original design.
- hdhrufjdi 4y agoBloat like?
- bmitc 4y agoBloat is probably the wrong word, but I meant bloat in terms of complexity, at least from my perspective in terms of how easy it is to learn.
- pornel 4y agoI've programmed in Rust since 0.7 and I can assure you that the Rust today is the leanest, easiest to learn version of the language. Since 1.0 Rust has added ability to use arrays larger than 32 elements. That's not bloat, that's a fix of an embarrassingly large TODO left in 1.0. Rust added a new module system, which most people find easier to use than the original one. The new one technically does more, but these are things that everyone expected it to do anyway (e.g. in Rust 1.0 use of `std` in code worked only in some files, sometimes, because reasons. Now it works in every file, even though technically it's a more complicated name lookup). Rust has added a new borrow checker. The implementation is waaay more complicated than the original scope-based one, but the result for the end user is that it mostly just works. In Rust 1.0 lots of borrowing didn't work for dumb reasons. You used to have to declare variables precisely in a reverse order of their destruction, or the code wouldn't compile. You often had to add extra {} around lines of code that mutated collections, because the simplistic borrow checker didn't understand when the mutation ended. Even async, which itself is a big new feature, simplified networking code a lot. I've written a network service in Rust before async, and it was a pain, and run-time overhead, to deal with ownership in callback closures that required manual reference counting and didn't allow references. Async in Rust still has its quirks and limitations, but Rust 1.0 had all of them, and then some more. Most importantly, Rust error messages have massively improved since 1.0. Things that used to be gotchas where people were getting completely stuck (such as needing .as_ref() on Option) are now pointed out by the compiler. The compiler is now much faster, and generates better code. Rust has matured, and almost everything it has added since 1.0 should have been in 1.0.
- oconnor663 4y agoI'm biased as a Rust fan, but I don't think this is accurate. I think this impression comes from people who don't know Rust reading the release notes and assuming that the rate of new features must mean the language is full of old legacy junk that no one recommends using anymore. But there are actually very few things like that in standard Rust. (The old `try` macro and the `ref` keyword are two examples. std::sync::mpsc is maybe another.) A large portion of the changes have been fleshing out APIs and removing limitations, which arguably makes the language less complicated over time. "Nonlexical lifetimes" and "match ergonomics" are two examples of this, which each took a lot of work.
- bmitc 4y agoThanks to you and the other commenter. It seems my perception of the timeline is indeed incorrect, although I'm not sure my view of its complexity is. I have found it difficult to dive into but want to give it another whirl here at some point.
- oconnor663 4y agoThere's definitely a learning curve, no doubt about that. I usually advise learners to expect to read a book. It doesn't have to be The Book, and there are several other good ones to choose from, but expect a book. For most people, learning from examples and compiler errors isn't the way to go. If you happen to be coming from a C++ background, here's a shameless plug for my own intro video :) https://www.youtube.com/watch?v=IPmRDS0OSxM https://www.youtube.com/watch?v=IPmRDS0OSxM