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

For two reasons: First, where C++ features are used, it make the code harder to understand rather than easier. Second, it requires newer and more complex toolchains to build GCC itself. Some people still maintain the last C version of GCC just to keep the bootstrap path open.
 help



I'm very far from compiler development, but in my experience, while C++ is hard to read, the equivalent C code would be much more unreadable.

This is not my experience at all. In fact, my experience is where C++ is used in GCC it became harder to read. Note that GCC was written in C and then introduced C++ features later so this is not hypothetical.

In general, I think clean C code is easier to read than C++ due to much less complexity and not having language features that make it more difficult to understand by hiding crucial information from the reader (overloading, references, templates, auto, ..).




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

Search: