71 karma · joined August 10, 2017
vec[3_s & 4]
is very much possible in C++. It's only two characters longer.(C++ doesn't have a ':' operator, you'll need to use some other symbol.)
Nah. Like the Rapture, "climate change" is forever. That's the beauty of it, it's the falling sky to end all falling skies.
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.
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.
> 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.
C++ templates are a purely-functional Lisplike language. There's nothing strange or absurd about it; it's a very vanilla way to approach string rewriting systems.
(It's ugly to read, yes, but then all Lisplikes are too.)
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.
No, it isn't. It's horrible. It read like advertising copy to sway dumb investors into pouring their life savings into Google stock.
Yes, if by that you mean "idiomatic C++ as C++ programmers write it".
It's the inexperienced "C/C++" (no such thing, BTW) that are 'choosing subsets', and doing it wrong 90% of the time.
No such thing.
Because you want to write a config file, not a program?
What next, config files, build systems and unit tests for your config files?
No thanks.
How is that possibly not "harm"??
I do.
Gimme back my plain old browser Javascript. It was primitive, but at least it wasn't actively harmful.
'async' exists because Python has that GIL bullshit and so Python programmers had to invent that fifth wheel of 'async programming'.
Programmers in other languages then got jealous because they, too, wanted a complex, unnecessary framework that pollutes the whole runtime and serves to differentiate regular programmers from 'rockstar' programmers.
And so async got fashionable and barely-literate coders now think async is magic performance dust that will automatically make your program run 1000% faster.
TL;DR - it's just fashion, give it five years and we'll be reading posts about how async sucks and that it's stupid legacy tech invented by bonehead dinosaurs.
No thanks.
But that's exactly how it is with our Universe! There's clear evidence that the important and relevant stuff happens only in the Solar System, and the rest of the Universe is just empty procedurally-generated useless filler.
Don't open it too wide, unhygienic stuff might fall in.
On a related note: why is it that people understand basic food hygiene (don't eat rotten meat, wash your vegetables, spoiled milk is bad, etc.), but can't seem to grasp that the same basic concept applies to mental food too?
You are what you eat, and that applies to what you read and consume in media too.
Well, no. There is zero reason to use Rust if you already know modern C++. Rust's only benefit is being newbie-friendly.
Is there a more user-hostile webapp than Twitter? I think not.
There's a simple answer: ball bearings are relatively high tech that requires lots of innovation to come together at the same time.
Seems to work for the rest of humanity.
Not true. Russian passenger rail is profitable and growing.
Absolutely false. It just seems that way because you read biased research and articles.
There's a boatload of problems that cannot be solved with pattern matching and tree search. Even really simple ones.
One example is estimating/predicting binomial proportions adequately.
People promote Clang because it has a permissive license and opens the door for Google and Apple to inject proprietary crap into Linux.