HACKER Q&A
📣 behnamoh

Is Rust worth investing in as a reliable C-alt given its recent saga?


I've been programming in high-level languages for a while and recently I was thinking about learning something more bare metal. Rust stood out as one of the popular C/C++ alternatives. But for me, the investment in a language is driven by not just the beauty of the language itself, but the community around it.

As an outsider who's keeping an eye on Rust, am I better off sticking to vanilla C/C++?


  👤 Georgelemental Accepted Answer ✓
Technically, the language is excellent. Organizationally, major corporations have invested a lot of resources into it, they won't allow it to fail. Community-wise, there are lots of friendly and supportive people in the quieter corners (this is true most everywhere, I think).

That being said, my recommendation for learning systems programming would be to consider trying plain old C first. Rust's safety features are a godsend, but IMO easier to understand once you have experienced working without them. (Similarly, I like to recommend leaning a dynamically typed language first, and introducing static typing later.)


👤 habitue
Just a recommendation, but learn Rust first. Once you have a good intuition about mutability xor aliasing (which is what the borrow checker enforces), you'll actually write better C and C++ code should you need to.

Personally, I think Rust is the future of systems programming and there's no more reason to learn C / C++ than there is a reason to learn FORTRAN or COBOL (specifically, the reason is only ever "I need to get a job using those languages"). But, you know, feel free to take that with a grain of salt and see for yourself.

Rust isn't going anywhere any time soon given how many big companies use it, so even if you learn C/C++ first, you'll likely need to learn rust as well eventually if you want to do systems stuff.


👤 andrewmcwatters
I agree with what other posters say here regarding building, specifically, C knowledge first.

Further, I've noticed a trend highlighted by people such as Jonathan Blow that there are users of Rust who don't fully understand object lifetimes in particular systems and are hacking around warnings in Rust creating unsafe memory scenarios while being told otherwise because all of their compiler messages have disappeared.

Some things in software engineering are hard, but you can't escape them. It seems like you can only defer the problem until you actually need to understand what's going on, and by the time you realize that, you'll be deep in experience with "weird holes" in your knowledge (as I fondly remember a (pre-?)algebra teacher telling me when I was discussing quaternions in middle school.)


👤 cmrdporcupine
To me, it looks like Rust is suffering from "cool kids syndrome." It's hip right now, and all the cool kids are piling in, or some of the people who have been using it for a while are hoping to cash in social capital.

I don't understand this way of using technology or being in this profession; self promotion and dialogue through twitter, blog posting all over the place, conferences, panels, books, speaking tours, ego & self promotion all built around particular tools.

In the end these are tools for writing software and we get paid. Is Rust a better tool that some others? Yes, and it's what I'm working with these days. But it's not a lifestyle, and it should not be a culture/subculture. Other professions don't generally talk this way about their tools, why are certain people in software like this?

To answer the question: Rust is a good systems programming language. But I will say this: many of the people piling into it right now don't actually need Rust.


👤 daviddever23box
IMHO, one should make one's language choices based on utility and NOT solely on metacharacteristics such as quality of governance, DEI efforts, or nation of origin. None of these things matter when the program is run, if the process and end result do not solve the problem(s) at hand.

Thorough feature discussion, appropriate licensing, and accessibility of source code for risk evaluation are metacharacteristics that are relevant.

And-lest anyone think that, as a white cisgender male born in America, I have no skin in the game, it is my belief that any interactions with others ought to be principled on transparent rigor and mutual respect, from which all other things should flow.


👤 paddw
If you have no experience with low level programming I think it is better to learn c first anyway. It will help you understand some of the problems that Rust's design solves.

👤 Georgelemental
Rust is technically excellent, and has significant buy-in from major corporations, who won't allowwz their investments to go to waste. I wouldn't worry about the drama.

👤 lostdog
I program a lot of personal projects and just ignore the drama. It's a fun language to program in, and whatever dramatics the core team is engaged in, they've still managed to put out an excellent language and ecosystem.

👤 fnordpiglet
Yes. Excellent modern language with vibrant package management ecosystem. Some of the memory semantics can be a bit tricky to keep straight when to do what and why, but as you understand ownership and borrowing better it gets easier and more intuited. Good trait and generics strategies can be tricky, and asynch is a bit clumsy at times.

👤 Lariscus
Every community has its fair share of drama. I wouldn't worry too much about such things.

👤 cookieperson
Yes absolutely. The politics is stupid crap. If everyone in the rust org quit the community would continue onwards just fine.

Rust is a great language with a lot of advantages and is absolutely worth considering for your next project.


👤 revskill
I found programming in Rust is fun. The std library provides efficient implementation for your need, which made your time spent worth it.

Whatever your goal is, it's worth your time as i see it.


👤 bjourne
Community drama is a terrible way to evaluate a language.