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

C is not simpler as C++ as you can program( with a few minor differences ) in C++ using C style. In that case both are equally complex.


Your statement that, effectively, C++ can do everything C can, plus more, has the direct logical implication that C++ is absolutely more complex, not equally complex.

(FWIW, I don't fully agree with even that statement. C++ makes using e.g. enums with bitmasks much harder than C.)


His point is that actually you don't want to write plain C - you want to pick some C++ features that considerably reduce the complexity of your code.


Correct. Even if you simply changed all of your dynamic arrays to std::vectors, the code you write is now simpler, easier to reason about, and pretty much memory leak-free.




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

Search: