News for hackers. Stuff that matters.
Re:Why Go and Not Rust? by arcticbull on Monday September 16, 2019 @03:11PM (#20987507)
Im 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++.

Re:Why Go and Not Rust? by otabdeveloper2 on Monday September 16, 2019 @03:21PM (#20987617)
> 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.

Re:Why Go and Not Rust? by munk-a on Monday September 16, 2019 @04:03PM (#20988025)
C++ (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.
Re:Why Go and Not Rust? by otabdeveloper2 on Friday September 20, 2019 @03:08PM (#21030135)
> 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.

Re:Why Go and Not Rust? by code_sloth on Monday September 16, 2019 @03:53PM (#20987922)
>> 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."

Re:Why Go and Not Rust? by otabdeveloper2 on Friday September 20, 2019 @03:15PM (#21030202)
> 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.

Re:Why Go and Not Rust? by kinjba11 on Monday September 16, 2019 @11:45PM (#20991229)
C++ has more historical baggage than any other mainstream language. Consider something as simple as initialization: https://www.youtube.com/watch?v=7DTlWPgX6zs