Live data from Hacker News

A half-hour to learn Rust

fasterthanli.me

171–180 of 342 posts

Re: A half-hour to learn Rust

#171
post #161

As a Python programmer with limited experience with compiled languages, Rust code was more intimidating to read or look at than C++, Java or Go. After only an hour, I am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. I cannot believe that I am smitten by Rust within an hour. Its features seem, obvious. My experience with Go was…

am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can.

All those lifetime annotations are not sheer beauty or pretty, sure they are necessary but not nice to look at if you are comparing it to a higher level language.

Re: A half-hour to learn Rust

#172
post #161

As a Python programmer with limited experience with compiled languages, Rust code was more intimidating to read or look at than C++, Java or Go. After only an hour, I am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. I cannot believe that I am smitten by Rust within an hour. Its features seem, obvious. My experience with Go was…

Look into C++17, that one makes C++ look like Python but with worse basic libraries (not that Python ones are great either).

Re: A half-hour to learn Rust

#174
post #171
post #161

As a Python programmer with limited experience with compiled languages, Rust code was more intimidating to read or look at than C++, Java or Go. After only an hour, I am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. I cannot believe that I am smitten by Rust within an hour. Its features seem, obvious. My experience with Go was…

am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. All those lifetime annotations are not sheer beauty or pretty, sure they are necessary but not nice to look at if you are comparing it to a higher level language.

You can write Rust code with almost no lifetine annotations. That's heavily dependent on the domain, of course. But for relatively simple function signatures they are usually inferred correctly, and you can often just clone instead of requiring references.

Re: A half-hour to learn Rust

#175
post #29

A half-hour to learn Rust Jan 27, 2020 · 51 minute read · rust maybe the site's reading time estimator is broken? sarcasm intended. But seriously, it is good to have people writing things like this.

Programmers don't read, they skim in half the time, then auto-complete in their mind with false assumptions!

Ouch! And just in time for New Year's resolutions. Thanks!

Re: A half-hour to learn Rust

#176
post #171
post #161

As a Python programmer with limited experience with compiled languages, Rust code was more intimidating to read or look at than C++, Java or Go. After only an hour, I am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. I cannot believe that I am smitten by Rust within an hour. Its features seem, obvious. My experience with Go was…

am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. All those lifetime annotations are not sheer beauty or pretty, sure they are necessary but not nice to look at if you are comparing it to a higher level language.

All those? Very small amounts of an average Rust code base will have lifetimes.

Re: A half-hour to learn Rust

#177
I was inspired by this article and wrote "Twenty minutes to learn Go" [0]. Go being a much simpler language than Rust, I feel that anyone who knows a programming language can become productive in Go in less than an hour. Of course this simplicity comes at the cost of increased boilerplate, less expressiveness...

0: https://ibraheem.ca/posts/go-in-twenty

Re: A half-hour to learn Rust

#178
post #172
post #161

As a Python programmer with limited experience with compiled languages, Rust code was more intimidating to read or look at than C++, Java or Go. After only an hour, I am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. I cannot believe that I am smitten by Rust within an hour. Its features seem, obvious. My experience with Go was…

Look into C++17, that one makes C++ look like Python but with worse basic libraries (not that Python ones are great either).

Unfortunately one can’t live solely in C++17. The sheer amount of syntax and knowledge required to write C++ productively is insane.

Re: A half-hour to learn Rust

#179
post #171
post #161

As a Python programmer with limited experience with compiled languages, Rust code was more intimidating to read or look at than C++, Java or Go. After only an hour, I am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. I cannot believe that I am smitten by Rust within an hour. Its features seem, obvious. My experience with Go was…

am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. All those lifetime annotations are not sheer beauty or pretty, sure they are necessary but not nice to look at if you are comparing it to a higher level language.

I agree it's not pretty. It took me several passes to just understand what was going on there. But ownership is something I've never come across before and it doesn't exist in Python (not to an average user anyway), so it seems a little unfair to compare Rust and Python based on that feature.

However when you take a high level feature like overriding operators which can be done elegantly in Python, for a complied language, Rust's way is quite concise, readable and to my eyes quite pretty.

Edit: Typos

Re: A half-hour to learn Rust

#180
post #111

There's a lot of valuable, condensed knowledge here, but for those who wish to learn the language in a more interactive way I recommend Rustlings: https://github.com/rust-lang/rustlings I spent the last two weeks going through it and so far the experience has been great. There's a quiz at the end of most chapters.

I have been learning rust interactively with Exercism, which uses a mentor system to provide feedback and suggestions.

https://exercism.io/tracks/rust

It's also great to view other learner's solutions once you complete the exercise.

Post reply on HN