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

The one big (and IMHO most problematic) thing that Rust and C++ have in common is the desire to implement important core features via the stdlib instead of new language syntax. Also both C++ and Rust use RAII for 'garbage collection' and the 'zero-cost-abstraction promise' is the same, with the same downsides (low debug-mode runtime performance and high release-mode build times).


While I don’t disagree that there’s a similar desire regarding libraries vs syntax, Rust is also more willing to make things first class language features if there’s a benefit. Enums vs std::variant, for example.


And it's a balance act, both approaches to language design have merit.

That being said, I can't work with std::variant, and God knows I tried to like it. Rust's enums look a lot nicer by comparison, haven't had enough experience to run into potential rough edges which I'm sure are there.




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

Search: