5 ms·
Half the way into the article, I felt like crying. Is it just me or is the standards committee actively trying to reduce the number of existing C++ programmers.
by option_greek 9y ago
Half the way into the article, I felt like crying. Is it just me or is the standards committee actively trying to reduce the number of existing C++ programmers. I think we are better off with boost than learning this new stuff. I hope the people in standards committee will lose their C#/Java/<insert cool language> envy and be more selective in what they want to add to standards.
- jff 9y ago> I think we are better off with boost Whoa, let's not say things we can't take back ;)
- copx 9y agohttps://twitter.com/id_aa_carmack/status/81104943490146304 https://twitter.com/id_aa_carmack/status/81104943490146304
- xienze 9y agoOr you could just skip the part after the author went "ugh, I have to write a visitor, that's like, so many characters to type." He's whining over a fairly minor point and jumping through way more hoops than necessary. The proposed "default" way to visit std::variant is honestly pretty clear and simple in comparison to most C++ code.
- norswap 9y agoAt this point (and I suspect for a long time), the only thing C++ hasn't that Java and C# have is garbage collection.
- jb1991 9y agoAnd what about all the things that C++ has that no other language in the world has?
- hossbeast 9y agoI wonder why no other language has added them? Could there be a reason ...
- hellofunk 9y agoBecause different languages have different goals, and most languages don't need the flexibility and power of many of C++'s features, and favor an easier language while sacrificing some of these extra language tools.
- norswap 9y agoAt ease soldier. That was exactly my point: C++ has much more stuff than Java and C#. So saying that C++ has Java envy seems weird.
- hellofunk 9y ago> At ease soldier. Thank you for the condescension. But if that was your point, you could have written it more clearly.
- pavon 9y ago> I think we are better off with boost than learning this new stuff. Is this not a relatively direct import from boost: http://www.boost.org/doc/libs/1_64_0/doc/html/variant.html I remember that being relatively painful to use 10 years ago.
- option_greek 9y agoWhich is why no one uses it. The good thing about boost is you get to evaluate features based on merit and be choosy. Putting these in the standard creates an expectation that developers be aware of how to use them.
- blub 9y agoI used it together with type() to read the variant's current type and act on that. The std::variant has a bit nicer API compared to boost with e.g holds_alternative. I expect I would create a make_visitor wrapper myself or use an open source one if needed, but it wasn't needed.
- hossbeast 9y agoJust use C, and retain your sanity. C++ is full of awkward heavyweight hard to understand abstractions like this.
- kllrnohj 9y agoStraight C is ridiculously hard to write at any scale with any sanity. Not to mention it requires re-inventing stuff that you're basically guaranteed to get wrong (such ref counting), which of course none of the libraries you want to use will support so you have to wrap that up in something else. C++ is a massive improvement over straight C in pretty much every practical way. And best part is if you don't want to use awkward, heavyweight abstractions like std::variant then you can just not use them and be no worse off for it.
- fsociety 9y agoI used to think this until I worked on a large C project at scale. C++ definitely has some improvements over C, but it definitely does not have a "massive improvement over straight C in pretty much every practical way". It's pretty bad that you have to avoid many parts of the language. I've also noticed from various projects that C projects tend to have less code to grok than C++ projects while achieving the same thing. Who would've thought.
- jcelerier 9y ago> I think we are better off with boost than learning this new stuff. This new stuff actually comes from boost (like most new stuff in C++)