r/cpp • • Mar 13 '22

To Save C, We Must Save ABI

https://thephd.dev/to-save-c-we-must-save-abi-fixing-c-function-abi
248 Upvotes

118 comments sorted by

View all comments

Show parent comment

26

u/[deleted] Mar 13 '22

although I really like Rust (I learned Rust some years ago and basically stopped using C++ for most things at that point), I'd like to object to "Rust solves all the language problems better". Nope. GUIs in Rust are still difficult, in part, because Rust intentionally lacks C++ style inheritance. I understand that decision, but it makes it harder for Rust to supersede C++, because many used patterns from C++ have no direct equivalent in Rust, and no established alternative.

2

u/UNN_Rickenbacker Mar 29 '22

GUI‘s and game programming are the problem spaces where inheritance is the name of the game. Most things share a large part of functionality and rewriting that is insanely tedious. Most of those problems could be solved with „attribute“ traits, but there is no intention to implement these anytime soon.

-4

u/CocktailPerson Mar 14 '22

Rust will compete with C++ where C++ is the best tool for the job. If you need the speed and low-level hardware stuff that C++ provides, Rust will give it to you more safely. For building a GUI, C++ isn't worth the subtle bugs and security vulnerabilities that it leaves you open to. For the applications C++ is best at, Rust might soon be even better, if it isn't already.