Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For one of my projects [1] I got about ten in-person questions/discussions equivalent to "Why don't you use Rust?" at various conferences/meetups over three years.

The enthusiasm of the person asking the question was evident.

What was trickier to handle was their insistence that "X would be better if written in Rust" without really understanding what makes X successful.

This was further compounded a bunch of copycat projects written in Rust with very limited functionality. Their project's marketing said that "it's written in Rust!" was their primary advantage.

Fundamentally, users don't care, or even know, which language your software is written in. All they care about is whether your software solves their problem.

To answer your direct question: I got multiple "you should use Rust!" comments. I smiled, said thank you I know that Rust is the right choice for certain problems. I then asked "How would Rust help here?" and listened.

When Rust is the right language for the problem, I'll re-write. Until then, I'll be polite and listen.

[1] https://github.com/twpayne/chezmoi



So as someone that potentially would ask you that, here's my thinking. Rust programs are (in my experience) always fast, less buggy (I'm sure you'll immediately scoff at that, but compared to the number of runtime errors I get in JS programs vs Rust I think it's significant), and they don't require massive dependency chains like Python and JS programs.

You could probably solve the things I just talked about with Go or some other new compiled language but the community has settled on Rust and Rust has great features right now that are working, so my thinking when I see something written in Rust is usually relief.


Is that because of the language itself, or because people who develop in Rust right now tend to really like programming, and are likely above-average developers?

I don’t really hate Rust and like what it has done for safety, but it hasn’t really been used widely enough to see what happens if “the masses” start to use it.


It is Rust itself. My Rust programs are less buggy than my C and JS programs, and I'm not smarter when writing Rust. In fact, I'm much lazier.

Where other languages say "you're just a bad programmer and you should feel bad", Rust makes it its own problem, and focuses on preventing such mistakes instead. Rust's infamous learning curve is from enforcing a ton of requirements that ultimately make more robust programs. You have to handle errors. You have to lock mutexes. You have limits on mutability and global state. You have to think about data flow, and can't just make a program that is a web of everything referencing everything else.

Rust is not that new. The masses are already using it. I've worked with Rust noobs, and I've seen "Enterprise Rust". Bad Rust code is still not that terrible. The language limits how much damage noobs can can cause. There's tooling to help with unidiomatic code. Heavy use of dependencies and strictness of Rust's interfaces means noobs can write simple glue code on top of someone else's robust code.


Rust is fantastic for writing robust, secure, high-performance software. Rust is definitely a much, much better C++ in almost every respect. No doubt there.

However, for many problems, the sweet spot of a good-enough static type system and garbage collector - effectively a better Python - is a better fit.

This article explains things well, IMHO: https://mdwdotla.medium.com/using-rust-at-a-startup-a-cautio...


someone posted a thorough benchmark on both compile and run times of rust vs C++ recently. c++ won on almost every test, so it's not as fast as rust people tend to spread.


I definitely have to checkout chezmoi.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: