4 ms·
The difference is that Rustlings requires the person to already know Rust whereas the link on this post (100 Exercises to Learn Rust) starts teaching Rust from
by AnonC 2y ago
The difference is that Rustlings requires the person to already know Rust whereas the link on this post (100 Exercises to Learn Rust) starts teaching Rust from the basics (assuming that the person knows another language).
- archixe 2y agoI did Rustlings without any knowledge of Rust and I thought it worked great. There are links to guide & documentation pages for every exercise. It worked great to learn the basics through practice.
- LegionMammal978 2y agoThat doesn't match with my experience: I learned the language from scratch just fine with Rustlings. (In fact, I found it more approachable than the Rust Book.) The first few groups of exercises in it walk you through the basic syntax and semantics, to the point that I found it almost tedious to work through, but I ultimately came to appreciate it.
- sshine 2y agoIn the most recent Rust Copenhagen Hack Night, half a dozen people took their first steps with Rustlings. It was my experience that it worked really well. Some people were speed-running it, others took their time to read the book references that came up once in a while. These 100 exercises build on the same interactive project format as Rustlings, so I would assume they're both great.
- resonious 2y agoI think Rust is close enough in syntax to C and Java so that just about any adept programmer can figure it out.
- leoedin 2y agoClose in syntax maybe, but you need quite a different mental model to build complex programs.
- tialaramex 2y agoTo me "the basics" means either no programming at all, or something rudimentary and half-remembered like you did simple Logo turtle graphic programming in math class as a ten year old and now you're thirty. Not "knows another language". I think it might be interesting to develop Rust-as-first-language teaching materials, but that's not what this is. Move assignment as your primary assignment semantic, borrowing as your metaphor rather than introducing the confusing idea of "addresses" (in Rust many things we can borrow don't have a meaningful address, but it's fine) and so on.
- deleted 2y ago[deleted]
- LoganDark 2y ago> I think it might be interesting to develop Rust-as-first-language teaching materials, but that's not what this is. Move assignment as your primary assignment semantic, borrowing as your metaphor rather than introducing the confusing idea of "addresses" (in Rust many things we can borrow don't have a meaningful address, but it's fine) and so on. I found that when learning Rust, it approximated the mental model that I had already developed for programming. Move semantics and such just felt right. I had used around 10–15 other programming languages by then, but none were even remotely Rust-like. I don't know why this is. It can't be that Rust is the objectively or even subjectively right way to think about programming. It has to be that its concepts were simply already intuitive to me, but I wonder why that is, when so many people struggle. Perhaps it's because of neurodivergence, maybe the language just matches the way I think in general and that's why it made sense so quickly. I'd probably make a terrible teacher, because I just do not understand the struggles people have with Rust, and I can't just teach someone to think the same way I do. Maybe when existing Rust users try to write material for new developers, they write in a way that, for lack of a better way of wording it, is only really accessible to their own neurotype. In other words, it doesn't really help the people that genuinely struggle with Rust's way of thinking, it primarily helps people who already have this way of thinking.
- tialaramex 2y agoCertainly in regards to say, ownership, Rust has to be very explicit about things which you'll find in the literature make sense for other languages but maybe are barely mentioned when they're taught. For example the life of objects is something Bjarne Stroustrup's early editions of his C++ book neglect, basically saying yeah objects come into existence and then they're later destroyed and it's only in the third edition once C++ has more powerful techniques for this stuff that suddenly it's important that C++ programmers care about this and there's IIRC a whole chapter of the book. It is also said that although Rust looks like a semicolon language, like C or Java or something, it's actually not like those semicolon language at all, it's an ML, the syntax makes it more palatable for semicolon programmers to learn and looks more "serious" for a systems language. As an ML, Rust gets a solid foundation in its type system. Rust has a type with no values, and a type with one value, Sum types and Product types, so we're on firm ground here, we can do type arithmetic. Languages like C++ struggle to have a type with one value†, and can't really do "no values" at all. It's like your system of arithmetic doesn't have zero. You can limp along, the Romans did, but it's an unenviable situation. † The C++ language isn't really sure how to handle these types properly because its rules say they need at least one byte of storage - but that entire byte is just padding. It's not insurmountable but it's very silly. Anyway, I think what you're feeling is more real than you've allowed for. This is concretely a better foundation, that's not an illusion. It's not perfect but the sense that this is how things should be makes sense compared to other popular languages.