Hacker News new | past | comments | ask | show | jobs | submit login

Most of the time, "C with classes" is exactly what the problem calls for. I cringe every time I see classes whose functionality can be replaced by a simple function. Those shouldn't even be classes. They should be free functions. And this happens quite often.



Free functions are fine, I prefer them also.

What I mean by "C with classes" is the worst side of both languages. Type-unsafe C coding (pointers, casts., manual memory allocations, etc), with OOP (highly coupled complex class hierarchies, virtual calls, etc).

The modern C++ way is to use RAII, value semantics, and STL everywhere.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: