There's no cognitive load required to code in C++. You just don't know the language.
There's no easy tutorials or learning materials for it, but it's not hard.
There's no cognitive load required to code in C++. You just don't know the language.
There's no easy tutorials or learning materials for it, but it's not hard.
> You just don't know the language.
Nobody knows the language haha. If anyone tells you they know C++, they're absolutely wrong. This has been, IME, the easiest way to know if a candidate is over-stating their resume -- if they say they "know" C++.
No.
> full of edge cases,
Definitely no.
> it blows my mind every time I pick it up.
I'm tempted to say "programming is not for you", but I'll be charitable and just point out that you've never learned the actual language to make statements like that.
> If anyone tells you they know C++, they're absolutely wrong.
That's a load of crapola. It's impossible to "know C++" in the sense of knowing the ISO standard for C++; but that is also true of any other language with a real standard.
Languages without standards, of course, are worse in every way.
False.
std::string x = y;
There's no way to mess this up.Again, learn the language. There is no such thing as "C/C++". 99% of the problems stem from the fact that people don't understand that C and C++ are completely different languages, despite sharing one compiler.
Learn C++ as itself and your problems go away.
> Lastly `const` what does it do where and why and should everyone ever use it...
`const` is a contract that means "I will not modify this object here". Nothing confusing or complex about it, unless you're trying to shoehorn this concept into C semantics somehow.
> No.
Most defenses I've seen of C++ boils down to something along the lines of "you're using it wrong (tm)".
I've seen enough C++ to take the side of "the design is probably wonky if it's that easy to do the wrong thing."
Maybe, but that wasn't what I said. The problem is that lots of people know C, but very, very few people know C++.
A big part of the problem is that both languages share one compiler, and people come from C thinking that C++ is just an upgrade with some features bolted on.
It's not. It's a completely different language, and if you approach it as "I'll learn a bit of C and then throw in some C++ features" you're setting yourself up for a world of hurt.
The hurt goes away if you forget C, start with a clean slate and learn C++ as a new language.