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

In fairness I think C++ has had a lot more compromise in its "design" than C did. C has a bunch of issues but it's understandable. C++, nobody understands it all, and it changes so much from compiler to compiler, accross hardware platforms and so on.

Pure virtual base protected friend member functions aren't in C.



C also changes a lot between compilers,specially thanks to undefined behavior and vendor extensions. A feature C++ inherited from C.

Even between versions of the same compiler. Quite bad in the embedded space.

Lack of bounds checking for native arrays, null terminated strings, arrays that decay into pointers, include files instead of proper modules, implicit conversions are among the inherited features.

>Pure virtual base protected friend member functions aren't in C.

No they are not, but as someone that knows C++ since 1993, I fail to see the problem.

Pure virtual base => requires redefinition in derived classes

Protected => only accessible in derived classes

Friend => can be used by protected member functions of friend classes

Not needed in every day C++ code, but enterprise architects love this type of flexibility, which doesn't have anything to do with safety.




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

Search: