3 ms·
> It's much easier to write C++ than it is to read it. This is because you can always write using a simple clear subset of C++ that you understand. Try to pick
by keldaris 9y ago
> It's much easier to write C++ than it is to read it. This is because you can always write using a simple clear subset of C++ that you understand. Try to pick a style that you think as many people as possible will understand. Programming languages are for humans to read. I try to write code that I think C programmers can read.
While I don't disagree with the sentiment (quite the contrary), if writing code that C programmers can easily read is the goal, using the STL is probably not the best idea.
Personally, while I'm very biased by my usecase for C++ (compute-bound performance sensitive numerical code), I quite enjoy writing code that's essentially C with function overloading, operator overloading and a few judiciously placed templates. I don't miss the STL, OOP, smart pointers and the rest, and the language suddenly seems much more concise and convenient, not to mention compile times are virtually instant and debug builds aren't unusably slow any more. YMMV, of course, everyone should pick the subset of C++ that suits their usecase and relevant constraints.