6 ms·
It's more batteries included and the packaging ecosystem story is better than alternatives. Certain safety guarantees are a nice to have. If you just want a be
by DistractionRect 2y ago
It's more batteries included and the packaging ecosystem story is better than alternatives. Certain safety guarantees are a nice to have.
If you just want a better c/c++ afaik that's zig, but I have no experience with it
- no_wizard 2y agoAn aside question I have is what’s the best beginner Rust book out there that is up to date? I been learning Rust off and on and I have a more serious need to get up to speed with it but I’m unsure where it’s best to start in this way
- smodo 2y agoThe Rust Programming Language does a great job imho. It got me up to speed by reading it before bed for a month. I’d never written C/C++ before, just a lot of Python. It starts out really simply by explaining the type system and the borrow checker. Take it from there and do a couple of side projects, I’d say.
- kshri24 2y agoIn this order: 1. The Rust Book (Free) - https://doc.rust-lang.org/book/ https://doc.rust-lang.org/book/ 2. Rust by Example (Free) - https://doc.rust-lang.org/rust-by-example/ https://doc.rust-lang.org/rust-by-example/ 3. Rust Atomics and Locks - https://marabos.nl/atomics/ https://marabos.nl/atomics/ 4. Rust in Action - https://www.rustinaction.com/ https://www.rustinaction.com/ 5. Rust for Rustaceans - https://rust-for-rustaceans.com/ https://rust-for-rustaceans.com/ Also Jon Gjengset's channel is immensely valuable: https://www.youtube.com/c/JonGjengset https://www.youtube.com/c/JonGjengset
- crablearner 2y agoI have a hard copy of Programming Rust by Jim Blandy et al would that slot in nicely anywhere here?
- thesuperbigfrog 2y ago"Programming Rust" by Jim Blandy et al was the book that really helped me to understand why many of the design decisions behind the implementation of Rust were made. I found it more approachable than some of the other Rust books and highly recommend it as a first Rust book.
- kshri24 2y agoUnfortunately, I haven't read Programming Rust. The list includes just the books I used to learn Rust. But will definitely give Blandy's book a read. Thanks for the recommendation!
- abenga 2y agoProgramming Rust is the best beginner Rust programming book in my opinion, followed by the official book. It has more detail and better examples.
- akkad33 2y agoWhat do you think about Rust for Rustaceans? I read it and there are very niche and useful information there about Rust that I didn't see anywhere. It's a solid book but for a book about programming there are so few real code examples that it can come off dry. I just bought Rust atomic and locks and it seems exercise based, so I'm excited to finish it. The first chapter seems promising
- timeon 2y agoAs title implies, Rust for Rustaceans is not for those that are just starting with the language.
- akkad33 2y agoMy gripe is not about it being not beginner friendly, but it not having many code examples for a programming Book. One doesn't preclude the other imo
- kshri24 2y agoYou are right about it not being a beginner friendly book. Hence why I placed it lower in the order of books to study. Yeah Rust atomics and locks is essential if you truly want to understand low-level concurrency. But you might have to also refer to the C++ std::atomics reference [1] to get a complete idea. It took me a while to grasp those concepts. [1]: https://en.cppreference.com/w/cpp/atomic/atomic https://en.cppreference.com/w/cpp/atomic/atomic
- airstrike 2y agoWrite an `iced` app, is my suggestion. You'll learn some of the best of what Rust has to offer
- codr7 2y agoC/C++ are two very different languages. Zig seems to follow the C tradition, and Rust C++.
- akkad33 2y agoWhy do people say Rust follows the tradition of C++? Rust follows very different design decisions than C++ like a different approach to backwards compatibility, it does not tack on one feature on top of another, it is memory safe etc that are very different from C++. If you are just comparing the size of language, there are other complex languages out there like D, Ada etc
- worik 2y ago> Why do people say Rust follows the tradition of C++? They mean the domain that Rust is in. Before Rust there was only C or C++ for real time programming. C++ was an experiment (wildly successful IMO when I left it in 2001) trying to address the shortcomings of C. It turned out that too much of everything was in C++, long compile times, a manual several inches thick, huge executables. Some experiments turned out not to be a good idea (exceptions, multiple inheritance, inheritance from concrete classes....) Rust is a successor in that sense. It draws on the lessons of C++ and functional programming. I hope I live long enough to see the next language in this sequence that learns form the mistakes of Rust (there are a few, and it will take some more years to find them all)
- johnisgood 2y agoSome of C++'s warts are still available in Rust, though, such as long compile times. Additionally it encourages using a lot of dependencies, too, just like npm does. Anyways, I dislike C++, it is too bloated and I would rather just use C.
- pjmlp 2y agoIt was no experiment at all, it was Bjarne Stroustroup way to never ever repeat his downgrade experience from Simula to BCPL, after he started working at Bell Labs and was originally going to have to write a distributed systems infrastructure in C. Also there have been alternatives to C and C++, even if they tend to be ignored by most folks.
- KerrAvon 2y agoZig is not yet stable enough to base a long-term project around, unless something's changed very recently. If you really only want a better C/C++, use C++ and amp up your use of safer types (or consider D).
- flohofwoe 2y agoZig doesn't promise language or stdlib stability yet, but in reality the changes are quite manageable. And it's already good enough for some high-profile real-world projects like Bun (https://bun.sh/ https://bun.sh/), Tigerbeetle (https://tigerbeetle.com/ https://tigerbeetle.com/) or Ghostty (https://ghostty.org/ https://ghostty.org/). In the end, language stability isn't as important as it used to be, people are quite used to fixing their code when upgrading dependencies to a new major version for instance.
- pjmlp 2y agoIt remains to be seen if any of those projects will be around in a couple of years. I haven't yet seen something that would make me have to consider Zig, regardless of my personal opinion, like other languages that have grown to become unavoidable.
- worik 2y ago> the packaging ecosystem story I love Rust, I am a devotee and an advocate. But the packaging system, more importantly the lack of a comprehensive system crate, is one of the greatest weaknesses of Rust. A simple programme can pull in hundreds of crates from goodness knows where and by Dog knows who, for all sorts of uncertainties. There are work arounds, but they eat up time that could be used far more productively