Ask HN: Which is better in your opinion: C or C++.Justify your answer?
2•Forgret•1h ago
Comments
RS-232•1h ago
You would reach for one or the other depending on what you’re trying to do. They excel at different things.
C: language interop/FFI
C++: systems programming
But if you HAD to pick one, it has to be C for ubiquity.
ankurdhama•1h ago
Given the choice between these I will probably pick C++ because of its feature that allows creation of higher level of abstractions. Abstractions are not just about "nice code", they are more about helping you think through complex problem.
Forgret•1h ago
I will choose C for one simple reason: less unnecessary overhead. In C++, a lot of additional stuff can be added to the binary after compilation, which makes it harder to fully control. With C, I get a clean binary right away, and that’s what I prefer.
incomingpain•1h ago
When I coded in C++, it was nearly indistinguishable from C. I didnt use any of the ++ benefits.
aarkaay•52m ago
C for more control, C++ for easier coding. Depends totally on use case. In some cases, where speed matters, C is KING.
RS-232•1h ago
C: language interop/FFI
C++: systems programming
But if you HAD to pick one, it has to be C for ubiquity.