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

can we just move on from C/C++ already


We can't even move past FORTRAN and Cobol, let alone C/++.


Why would we want to move away from them? Fortran is VERY good at what it is intended for (implementing formulas in code).


Fortran added the most important OO feature, methods bound to types, around 2003. Therefore, it is a more modern object oriented language than C++, in the sense that the object oriented features were Frankensteind on more recently. So maybe we could move past C++ to it.


You don't just "move on" from a multi million line code base.

Hell everything only works by interoping with those languages given the OS is written in one of them.


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.


What is holding you? And if you mean the rest of us - live and let live.


What's holding me? People writing software who are choosing C/C++ for legacy reasons only.


When I use C or C++, it's certainly not for legacy reasons. And my use of it doesn't prevent you from using a different language.


Other languages need tooling and featurefulness that is overall on par with C++ first. So far no low level language has profilers and debuggers that are as good, none have nearly as many compiler hints, and most are far harder to write zero overhead abstractions in. Not all developers need these tools all the time, but their availability is what keeps C++ attractive.


I do not use C++ just for legacy reasons. And frankly I do not give a flying fuck about holding people like yourself. You are free to do as you please, do not expect others to provide for you.


Currently employed writing new C++ btw.


Currently employed writing new C btw. It's not holding me back one bit.


why? is there a real alternative? (no there isn't)


Zig is getting there. Very ergonomic at doing the kind of bit bashing stuff people might reach to C for. It's about as easy to use C libraries in Zig as it is in C++.


Zig makes me think of the people that reject C++ and stick to C, with some shitty Go thrown in.

No one will ever take it seriously.


Zig is the future, Zig and C as a combination is amazing and in my opinion will change everything.




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

Search: