3 ms·
On the second point I have to disagree. I worked with plenty of C++ who have been programming for years but never read a C++ book. Many of them are stuck doing
by petke 11y ago
On the second point I have to disagree. I worked with plenty of C++ who have been programming for years but never read a C++ book. Many of them are stuck doing hacky "C with classes" programming, much like they did from day one. The attitude is if it ain't broken, don't fix it.
I was one of those programmers. Then I picked up "Effective C++" by accident. It was a mind shift. I started coding differently after all these years. I got hooked and read every popular non beginner C++ book out there (I would guess around 50 of them).
So I think reading books, is a better way of learning to program than just blindly going your own way, or the blind leading the blind.
- melted 11y agoMost 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.
- petke 11y agoFree 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.