Re:} // good to go
by melted on Friday January 01, 2016 @02:13PM
(#10822919)
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.
[ Parent
| on HN ]
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.