Live data from Hacker News

A half-hour to learn Rust

fasterthanli.me

161–170 of 342 posts

Re: A half-hour to learn Rust

#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 frustrating since I felt like I had to give up elegance for practicality. I did not expect to learn 1-2% of Rust when I woke up today. My thanks to the author.

I'm curious what other what other developers who primarily use Python think of this article and Rust in general?

Re: A half-hour to learn Rust

#162
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…

This podcast might be relevant: the creator of Flask who is now using Rust: https://realpython.com/podcasts/rpp/18/

Edit - actually I was probably thinking of this podcast with the same interviewee: https://rustacean-station.org/episode/004-rust-in-production...

Re: A half-hour to learn Rust

#163
post #159
post #15

That is the best article on Rust I've ever seen. Better than the Rust book. I've been saying that Rust needed a book that wasn't written by the designers of the language, who are too close to it. Now we have one.

Out of curiosity, what don't you like about the Rust book? I personally loved it, reading about a year and a half ago. I thought they covered most of what I needed, was well written, and had plenty of good examples.

Not all writing clicks with every reader, it is impossible.

He previously said “That's too hard for an introductory book and not detailed enough for a reference manual.” It is very difficult to get this right, given our goals, and so reasonable people may think we fall short there.

Re: A half-hour to learn Rust

#164
post #46

It only took me a couple of hours to port one of my old C programs, an utility to produce a hexadecimal and ASCII dump to Rust. The Borrow checker didn't even faze me. All I needed was plenty of Google-fu and my coding skills. JetBrains CLion and git are also very useful tools.

> It only took me a couple of hours to port one of my old C programs, an utility to produce a hexadecimal and ASCII dump to Rust. Writing C code with Rust is a very different experience than converting C code to idiomatic Rust. There is more to porting than doing 1:1 conversions between keywords. And by your description your utility basically reads words and prints their value. That doesn't really venture too much be…

u8s, actually. But yes, you are right that was a very simple port. I to plan to do a port that's more complicated soon.

Re: A half-hour to learn Rust

#165
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…

> I cannot believe that I am smitten by Rust within an hour

This has been my, and a lot of my colleagues', experience with Rust. Never have I seen people fall in love with a programming language so strongly. And the love lasts for a long time.

Re: A half-hour to learn Rust

#166

This is precisely what I was looking for when I searched for “Rust for C++ programmers” in the past. I love the Rust book, but I’ve always thought the common focus on accessibility for newbie programmers made it feel tedious for those who are more seasoned. I’d love to see more writing like this, maybe even for other things like libraries!

I found the Rust book to be anything but tedious, as a seasoned programmer. As I read it, it made me want to cry thinking back on past bugs and issues that I had dealt with that the language had been designed to prevent.

It made me think of the days and weeks of debugging that I wouldn’t have needed to do, had Rust existed.

Re: A half-hour to learn Rust

#167
post #143

What I would like to also see in these types of well written articles is the answer to questions like "what can you do with Rust that you can not do with C?"

This may answer part of your question — it's focused on strings but draws parallels with C all along: https://fasterthanli.me/articles/working-with-strings-in-rus...

Re: A half-hour to learn Rust

#168
post #57
post #29

Earlier quoted context omitted.

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

And then try to write a GUI in Rust.

The state of that art is improving quickly: https://github.com/hecrj/iced

Re: A half-hour to learn Rust

#169

So Rust is Scala but with some extra complicated additional syntax around borrowing references and generic lifetime constraints.

Seeing Scala for the first time seemed this is what happens when Java marries Python.

Rust seems like when C++ marries Scala.

Disclaimer: I like C, Python and Scala but not a big fan of C++ and Java

Post reply on HN