Live data from Hacker News

Learning Rust in 3 Attempts

shreyb.dev

11–16 of 16 posts

Re: Learning Rust in 3 Attempts

#11

> I was equally disheartened and delighted to later learn that the simple mental model I had for the cpu and memory were yet further from reality. Compiler optimizations, pipelining, branch prediction, out of order execution etc. were all fascinating and slightly terrifying things to learn about. If you don’t understand the low-level/computer architecture, you will have a hard time learning Rust. It’s not a general p…

I really don't agree with this. You don't have to pay any attention to low level concepts (unless you want to) except maybe the borrow checker? Which barely counts IMO. Scope and mutability are concepts every programmer should be familiar with. Ownership is a simple principle. You definitely can use it as a systems language. But you can use it for lots of other things effectively - and that fits my definition of a general purpose language.

Re: Learning Rust in 3 Attempts

#12

> I was equally disheartened and delighted to later learn that the simple mental model I had for the cpu and memory were yet further from reality. Compiler optimizations, pipelining, branch prediction, out of order execution etc. were all fascinating and slightly terrifying things to learn about. If you don’t understand the low-level/computer architecture, you will have a hard time learning Rust. It’s not a general p…

Learning sole CS first is probably a good idea, but I don't agree with the reasoning. C++ exposes the underlying hardware to a large degree, and if you don't understand it, you'll be allowed to break stuff easily and before you know it. This is much harder to do in Rust. You don't need to know anything about function pointers, interrupts, registries, virtual tables, and what not, in order to follow the memory model. The unsafe parts, is a different story, so I suppose there is a limit. But Rust and C++ are fairly far apart imo.

Re: Learning Rust in 3 Attempts

#13

A programming language should not be so hard it takes multiple attempts. Rust is ultimately doomed to stay small for this reason. In programming, anything that can be done more simply WILL be done more simply by some competitor. This will be the fate of Rust.

I've had two serious attempts at learning Rust. Amusingly, I also chose a ray tracer for my last attempt. I was pretty happy with the resulting code but attempting a moderate refactor made me toss the whole project - I felt like I was fighting the language too much. Not sure if I'll try again

Re: Learning Rust in 3 Attempts

#14
This is definitely my experience with Rust so far... Though I need far more practice. My interests lay far more into communicate than Ray tracing and math though.

I've read through the same two books and build a few web services and websocket bits... Getting ready for a second pass at a multi channel chat server. I've used them for years, but never built one, closest was an irc web client in the mid 00s.

In any case, hoping the language gains more traction.

Re: Learning Rust in 3 Attempts

#16
Coming from C#/Typescript i don't get why people find rust so difficult, i mean its got its rought edges that take some getting used to but the few times i've used it it didn't seem all too difficult, and a shit ton easier than looking at C/C++
Post reply on HN