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

C no. Linux is C, and it works well.

C++ yes, there is no real reason to use C++ anymore outside of big libraries that require it.



> C++ yes, there is no real reason to use C++ anymore outside of big libraries that require it.

Some of us like C++ because it gives us a the freedom to work at the lowest level when we need to, while also giving us plenty of higher level APIs for most day to day situations, while having great compatibility with tons of software that is already out there. It seems we are at peak Rust fanboyism these days. I have nothing against Rust but the idea that Rust has already replaced C++, or will certainly do so in the future, is ludicrous. C++ has a ton of activity in the standards committee and has very interesting developments like cppfront. It is a vibrant community that continues to reinvent itself and in all likelihood is a lot larger than the Rust community.


As a C++ programmer since 1992, all through the 90's and oughts, I picked up Rust in 2019 or so... I'm not suggesting Rust has replaced C++, but IMHO, the writing is on the wall that C++ is past the point of saving. There has been a ton of activity in the standards committee since C++03, but "a ton of activity" has not been sufficient to save it thus far... I guess we can always keep hoping. Meanwhile, I can write more and more safe code in Rust that performs like C++ or better and "just works" while cppfront tries to gain traction. For me, it's not so much fanboyism as pragmatism... C++ has had its run, but life is short and I'm tired of waiting for the committee to stop adding features and start addressing UB and mutation in the presence of aliasing.


>freedom to work at the lowest level when we need to, while also giving us plenty of higher level APIs for most day to day situations,

Mixing of these two is why nobody really takes C++ seriously anymore.

If C++ dissalowed C style memory accessors, removed <reinterpret_cast> and everything was done through stdlib and smart pointers, it would probably be above Rust right now. A good portion of Rust borrow semantics were already built to the smart pointer system.

But with mixing, you not only have to deal with all the typing syntax, you also have no idea if you are just going to segfault because there is a C style dereference somewhere to a null pointer.


There is no real reason to use C++ anymore, except that it's often the only language you can practically use. Or, in other words, you end up using C++ because there are too many people designing new programming languages and too few people writing libraries for the existing languages.




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

Search: