3 ms·
> the cognitive load required There's no cognitive load required to code in C++. You just don't know the language. There's no easy tutorials or learning mater
by otabdeveloper2 7y ago
> the cognitive load required
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.
- arcticbull 7y agoIm not sure if this is sarcasm, honestly. C++ is one of the hardest languages to use, full of edge cases, it blows my mind every time I pick it up. > 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++.
- otabdeveloper2 7y ago> C++ is one of the hardest languages to use, 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.
- code_sloth 7y ago>> C++ is one of the hardest languages to use > 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."
- otabdeveloper2 7y ago> Most defenses I've seen of C++ boils down to something along the lines of "you're using it wrong (tm)". 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.
- munk-a 7y agoC++ (as a result of it's C roots) has one of the most obscure and arcane library assumptions out there. Different platforms only need to roughly adhere to a standard and this can cause wildly different usages. Additionally it's the only language I've ever worked in that provides ample opportunities to blow off your own foot while copying a string. Lastly `const` what does it do where and why and should everyone ever use it... C++ is one of the simplest languages at a surface level, but the standard is incredibly dirty.
- otabdeveloper2 7y ago> Additionally it's the only language I've ever worked in that provides ample opportunities to blow off your own foot while copying a string. 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.
- kinjba11 7y agoC++ has more historical baggage than any other mainstream language. Consider something as simple as initialization: https://www.youtube.com/watch?v=7DTlWPgX6zs https://www.youtube.com/watch?v=7DTlWPgX6zs
- marmaduke 7y agoThat's not true, and an example of it would be scoping rules. If you see 'x' in the code for a method, there are strictly more places that could come from than in say, Python or Gp, than in C++.