Hacker News new | ask | show | jobs
by otabdeveloper4 1897 days ago
At this point Rust is not the prmary ecosystem for anything.

The important and exciting new things are written in C++, not Rust. Rust has no advantages over C++ once you know C++.

5 comments

I find a lot more things that I like in rust over Cxx; I like the trait system over Cxx's whole virtual functions and interfaces. I like algebraic types and forced enumeration of cases, I like immutable by default without the need to write const everywhere, and I certainly prefer cargo over anything I have seen in Cxx ecosystem.
I agree that Rust isn't the primary ecosystem. But that's not a reason to dismiss Rust. If Rust could create components that can be incorporated into C/C++ systems, then we'd have a real contender for systems programming. The problem is Rust is strict, and it only goes one way, from C/C++ to Rust. That's the right first step!

Saying C++ is better than Rust "once you know it" doesn't make a lot of sense to me. No language is intrinsically better once mastered by a productive programmer.

Isn't this what the cxx project is aiming to do? https://github.com/dtolnay/cxx
This statement is wrong. Rust has many advantages over C++. Knowing c++ doesn’t make these advantages disappear. It’s like saying you know assembly language and can write 100% bug free code in assembly so C++ has no advantage over it.

Realistically, both languages have advantages and disadvantages.

I would counter then that it's impossible to ever "know C++" then given that even C++ experts write in memory-based security exploits from time to time.