Live data from Hacker News

A 30 minute introduction to Rust

words.steveklabnik.com

1–10 of 161 posts

Re: A 30 minute introduction to Rust

#3
I like this tutorial because dives straight into the most unique/unfamiliar parts of Rust (ownership/references) and gets them out of the way. It's a "learn the hard way"-style tutorial, and I think that's the best approach. Once you learn how ownership and borrowing work, along with ARCs and concurrency, everything else is really simple and just naturally falls out.

Re: A 30 minute introduction to Rust

#4

I like the overall structure, but I'm not sure about throwing so much syntax without explaining it in detail.

I've only written a little C and C++, about six years ago, but enough to understand the syntax well enough to understand C and non-templated C++ code. The introduction was at just the right level for me, and I didn't have any problems with the syntax.

I think it's well written, and it makes me interested in learning more about Rust. The one thing I'd like to have seen addressed is type inference.

Also, you don't credit the original author.

Re: A 30 minute introduction to Rust

#5
Thanks for the the tutorial! Rust seems a bit too complex to me. Like a C++ on steroid that wants to do and be everything. Nothing wrong with that but not my cup of tea. I'd rather stick to C if I need tight memory management, it is way simpler and straight forward. And if I need concurrency, I'll stick to Golang (or erlang). Really, it's such a pleasure to read some golang after reading this 30 minutes of Rust. Anyway, just my opinion.

Re: A 30 minute introduction to Rust

#7

I like the overall structure, but I'm not sure about throwing so much syntax without explaining it in detail.

From the article:

> But wait, how is that possible? We can’t both allow and disallow mutable state. What gives?

I had to re-read the above a few times. And still don't get it. Steve, what do you mean with it? Are you talking about how are Arc/RWArc implemented? Or is it something else?

Re: A 30 minute introduction to Rust

#8
post #4

I like the overall structure, but I'm not sure about throwing so much syntax without explaining it in detail.

I've only written a little C and C++, about six years ago, but enough to understand the syntax well enough to understand C and non-templated C++ code. The introduction was at just the right level for me, and I didn't have any problems with the syntax. I think it's well written, and it makes me interested in learning more about Rust. The one thing I'd like to have seen addressed is type inference. Also, you don't cred…

Great, thank you.

"This excellent presentation" is a link.

Re: A 30 minute introduction to Rust

#9

Thanks for the the tutorial! Rust seems a bit too complex to me. Like a C++ on steroid that wants to do and be everything. Nothing wrong with that but not my cup of tea. I'd rather stick to C if I need tight memory management, it is way simpler and straight forward. And if I need concurrency, I'll stick to Golang (or erlang). Really, it's such a pleasure to read some golang after reading this 30 minutes of Rust. Anyw…

I would argue that rust is both simpler and more consistent than either C or C++. No preprocessor, no pre/post increment, a real type system (instead of templates)—there's just not the mountain of undefined parts of the language that tends to be a large problem. Scala, in spite of being on a VM, is far closer to C++ IMHO in terms of attitude.

I actually find golang harder to read without parametric types (sans built-in slices and maps).

Re: A 30 minute introduction to Rust

#10
post #7

I like the overall structure, but I'm not sure about throwing so much syntax without explaining it in detail.

From the article: > But wait, how is that possible? We can’t both allow and disallow mutable state. What gives? I had to re-read the above a few times. And still don't get it. Steve, what do you mean with it? Are you talking about how are Arc/RWArc implemented? Or is it something else?

The previous sentence is "We gain the efficiency of shared mutable state, while retaining the safety of disallowing shared mutable state."

I also wasn't sure about the part you quoted, but I was trying to explain that it's not that Rust _doesn't_ allow shared mutable state, it's that while the language doesn't, you can use unsafe to build safe abstractions, so in practice, it does. Hmmm.

Post reply on HN