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

Short, incomplete list of reasons I prefer Rust, speaking from about five years experience with C++:

* Real pattern matching and sum types. std::variant doesn't cut the mustard

* Traits and derivable impls, rather than obscure operator overloads with fussy cv-qualified signatures

* No iterator invalidation bugs (among the worst C++ issues to debug, IME); no inheritance or need to care about "virtual destructors"; no "object slicing"; no crazy interactions between overloads and templates which require an IDE to determine which function you are actually calling

* Way better compiler error messages than clang or gcc

Each of those "no"s is something I've spent days if not weeks of my C++ career debugging.



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

Search: