4 ms·
>C++ takes 1 to 2 years tops to develop good habits provided you either read the effective C++ series or you have a good mentor. Just like any other language.
by jnbiche 13y ago
>C++ takes 1 to 2 years tops to develop good habits provided you either read the effective C++ series or you have a good mentor. Just like any other language.
But it's really not like any other language. In most other modern languages, you can write relatively safe code while you're mastering it. You may write unidiomatic code as you're learning, but you're not going to leave integer overflows or (with some modern languages) null pointer errors throughout your code.
So yes, I guess am saying programming languages should not require years of expertise. It's beneficial to have a Python or Go expert around, but you can write perfectly respectable code in these languages after a few weeks if you're an experienced programmer. Even in other paradigms like OCaml and Haskell, I see most skilled programmers picking up idiomatic usage after a few months.
What's idiomatic C++? What's safe C++? It's hard to define, and it's a vast language. C and C++ are fine tools to use if you're already an expert (except for those pesky bugs that bring down Internet security).
But for new language learners, there are thankfully a new wave of safe, type safe languages coming on board.
- cheez 13y agoC++03, sure, but not C++11. If any C++11 course begins with using raw pointers or arrays, they're doing the students a disservice. There are safe and unsafe parts of the language, the trick is when to use which. Go, Erlang, etc are all designed to be used for particular purposes. Go may break out of its box because it is a general purpose language, but its core use case is concurrency just like Erlang. I honestly doubt it will because its syntax is ugly, though not as fugly as C++ can be. I feel like the majority of C++ programmers would support gun ownership, which might say a lot.