I just want to give a shout out to "Rust for Rustaceans". I'm only three chapters in, and it's definitely the most enjoyable technical reading I've ever done because you learn so much, so quickly, and so easily. Steve Klabnik (co-author of "The Rust Programming Language") says it's the book to read after going through "The Rust Programming Language", and I couldn't agree more.
How I went about learning Rust
101–110 of 303 posts
Re: How I went about learning Rust
#102Earlier quoted context omitted.
Rust is the more elegant and powerful language. Creating a new language and repeating the "billion dollar mistake" by including null (sailing under the brand name "nil" in Go) is just crazy. Error handling is another strange thing in Go. And generics have been only introduced recently, but there is hardly any support for libraries in it (now). While Go is definitely fast enough for most scenarios, it is not the best…
> Creating a new language and repeating the "billion dollar mistake" by including null (sailing under the brand name "nil" in Go) is just crazy. Can you explain? What do I set ‘score’ to when someone hasn’t sat the test yet?
In rust, you would annotate score as `Option` (`u32` is one of Rust's integer types), and then you would set the score of someone who hasn't sat the test yet as `None`, and someone who got a 100 on the test as `Some(100)`.
Re: How I went about learning Rust
#103Earlier quoted context omitted.
I mean it depends . Many of aspects of Rust that are perceived as sharp edges are in fact the programmer bringing in their preferences and paradigms from other languages and trying to program that way in Rust. I was one of those and tried to do OOP in Rust. It was a pain. At some point I gave up and was like: "Okay Rust, I do it your way, I just want this to work". And it worked flawlessly and easy. I literally had t…
Rust actually supports most OOP features, with the main exception of implementation inheritance. And implementation inheritance is a nasty footgun in large-scale software systems (search around for: "fragile base class problem"), in a way that just doesn't apply to simple composition and pure interfaces (traits). So it's hard to fault Rust for including the latter and not the former.
I've seen it being repeated ad nauseam without any concrete backing.
I mean it has some OOP concepts. But it's mostly in traits. Saying Rust is OOP is a bit like saying Chimera is a Goat.
Anyone that tried to use OOP in Rust, knows it's next to impossible.
Re: How I went about learning Rust
#104I tried to pick up Rust a few years ago, but there were too many sharp edges. I thought it was a nice language, but was too early for actual use. I played with some libraries (Apache Arrow, etc) and it was nice. About 2 months ago I wanted to use Arrow within Elixir, which required me to start using Rust again (Elixir uses Rustler to safely convert from Rust Elixir without theoretically crashing the beam). I am amaze…
Re: How I went about learning Rust
#105I just want to give a shout out to "Rust for Rustaceans". I'm only three chapters in, and it's definitely the most enjoyable technical reading I've ever done because you learn so much, so quickly, and so easily. Steve Klabnik (co-author of "The Rust Programming Language") says it's the book to read after going through "The Rust Programming Language", and I couldn't agree more.
I just finished this book. I liked it and learnt a lot, but in some chapters I felt way too far from my comfort zone. The unsafe chapter and some part under the hood of async like Pin/Unpin was difficult for me.
Even in the first three chapters for example, if someone isn't familiar with memory layout in C, or the stack/heap distinction, ..etc, it can seem a bit complicated I think.
Re: How I went about learning Rust
#106Earlier quoted context omitted.
Rust is the more elegant and powerful language. Creating a new language and repeating the "billion dollar mistake" by including null (sailing under the brand name "nil" in Go) is just crazy. Error handling is another strange thing in Go. And generics have been only introduced recently, but there is hardly any support for libraries in it (now). While Go is definitely fast enough for most scenarios, it is not the best…
> Creating a new language and repeating the "billion dollar mistake" by including null (sailing under the brand name "nil" in Go) is just crazy. Can you explain? What do I set ‘score’ to when someone hasn’t sat the test yet?
You can have 100% type-safe, guaranteed at compile time code without null that can still represent the absence of data. Once you've used sum types, you feel clumsy when using Javascript, Python, Go, Ruby, C, C++, etc. especially when refactoring. Nullness infects your data model and always comes out of nowhere in production and ruins your day.
Re: How I went about learning Rust
#107I have been thinking to myself whether I should pick up Go or Rust as a new language this year. Coming from a NodeJS background, Rust looks a tad more complicated but it looks cooler. There are also more job listings looking for Golang than Rust which makes me wonder if Golang might be a more rewarding investment? What would be a good use case of Rust than Golang cannot do given its extra complexity and potentially l…
> What would be a good use case of Rust than Golang cannot do given its extra complexity and potentially lesser monetary reward? Anything where low-level control is required. It's not clear if there are true-Rust web apps in the wild (as opposed to web apps with some services in Rust); as far as I read, Rust web programming is ugly. The market still offers few positions, largely dominated by crypto. I have the impres…
There are. I run one. Written in pure Rust. 160k lines of Rust code in total, serving over 3 million HTTP requests per month. Best choice I've ever made.
Rust especially shines when you need to maintain a big project over a long period of time. People often say that Go is much more productive than Rust, and in most cases that is true, but as the size of your project increases and your expertise in the language increases this relationship inverts, and Rust starts to be much more productive. Pick a right tool for the job.
Re: How I went about learning Rust
#108A bit unrelated: Maybe I'm wrong, but I get the impression that the people who learn Rust, tend to be quite experienced programmers. I have yet to see complete beginners document their journey, starting with Rust. I've seen lots of people do that with C/C++, Java, and the other usual suspects - but Rust still seems like a language for at least intermediate programmers.
However, you don't need to be an expert to learn Rust. It even helps if you don't have too many expectations about OOP and pointers, because their Rust equivalents have different design patterns/idioms, and you may need to unlearn some things.
Re: How I went about learning Rust
#109I just want to give a shout out to "Rust for Rustaceans". I'm only three chapters in, and it's definitely the most enjoyable technical reading I've ever done because you learn so much, so quickly, and so easily. Steve Klabnik (co-author of "The Rust Programming Language") says it's the book to read after going through "The Rust Programming Language", and I couldn't agree more.
I would add though that I can see how it can be a pretty challenging read depending on prior experiences. Even then I believe it makes a lot of sense to read through it to at least get exposed to some topics and be able to recall later that you've read something about it when you need it.