News for hackers. Stuff that matters.
Re:Std::visit is everything wrong with modern C++ (2017) by otabdeveloper4 on Saturday December 05, 2020 @10:18AM (#25315145)
C++ is a simple tool with comprehensible abstractions. You just don't understand it because you don't have experience with how computers and compilers work under the hood of dynamic languages.
Re:Std::visit is everything wrong with modern C++ (2017) by vnorilo on Saturday December 05, 2020 @10:35AM (#25315279)
This sounds pretty condescending to me. I've worked on C++ for a long time, including on bare metal and compilers, and yes, the abstractions are totally comprehensible. But keeping them in your headspace is a full time job. The sheer size of the standard belies "simple" tool.
Re:Std::visit is everything wrong with modern C++ (2017) by User23 on Saturday December 05, 2020 @10:54AM (#25315418)
I used to sit next to a member of the C++ standards committee. He was quite open that he didn't fully comprehend the abstract machine and had to rely heavily on documentation. And as you'd expect he's a wizard at C++. There are a lot of great things you can say about C++, but that it's easy to understand is not one of them.
Re:Std::visit is everything wrong with modern C++ (2017) by geofft on Saturday December 05, 2020 @10:49AM (#25315383)
(It's also very funny because deeply understanding how compilers and computers work under the hood and making sure our C++ code keeps running is, in fact, one of the things I do in my full-time job.)
Re:Std::visit is everything wrong with modern C++ (2017) by snazz on Saturday December 05, 2020 @10:22AM (#25315171)
That’s a big assumption to make. I think it’s valid to say that C++ is complex and more difficult to understand than other compiled languages without resorting to ad hominem arguments.
Re:Std::visit is everything wrong with modern C++ (2017) by otabdeveloper4 on Saturday December 05, 2020 @10:33AM (#25315267)
Haskell is much more complex than C++, for one example. (How many language extensions does Haskell have now? A hundred?)

C++ is easy to understand when you understand the mental model its abstractions target.

(In some sense you're right: the mental model of Haskell is mathematical, while the mental model of C++ is some sort of multi-core "Harvard architecture" machine. While it's true that math is a lot easier for the human brain to grasp, this isn't really related to language complexity per se.)

Re:Std::visit is everything wrong with modern C++ (2017) by detaro on Saturday December 05, 2020 @10:31AM (#25315238)
To be fair, the root comment started by suggesting mental illnesses in C++ programmers, so charged responses are to be expected.
Re:Std::visit is everything wrong with modern C++ (2017) by nchi3 on Saturday December 05, 2020 @10:35AM (#25315273)
Stockholm syndrome isn't a mental illness, nor is it derigatory.
Re:Std::visit is everything wrong with modern C++ (2017) by detaro on Saturday December 05, 2020 @12:40PM (#25316457)
Suggesting everyone using C++ isn't capable of properly evaluating it (which the comment author can clearly tell from the outside, for every use case) is "not derogatory"?

(and from what I understand "Stockholm syndrome" is not classified as a medical condition because it's questioned if it actually exists as thing that can be usefully delineated, not because it wouldn't qualify)

I'm certainly not claiming "C++ is perfect and everything else is useless" or "Rust doesn't stand a chance", but this "there has to be something wrong with you if you use it/ever consider it more suitable" is seriously annoying, and disappointing to see as the top comment here (even if it's not the worst pro-rust denigration of C++-users I've seen). And is damaging the chances Rust et al have in these spaces.

Re:Std::visit is everything wrong with modern C++ (2017) by nchi3 on Saturday December 05, 2020 @04:06PM (#25318361)
Medical condition is a very different thing from a mental illness though. I'm quite sure there aren't mental _illnesses_ which last 1-2 days like Stockholm syndrome does.

>Suggesting everyone using C++ isn't capable of properly evaluating it (which the comment author can clearly tell from the outside, for every use case) is "not derogatory"?

I see it more as "I wonder if they have given other languages a chance?". There's definitely a lot of C++ devs who aren't giving for example Rust a try, and don't see the negatives of C++ because they haven't experienced anything else lately.

If anything, it was derogatory towards C++, not the devs.

Re:Std::visit is everything wrong with modern C++ (2017) by detaro on Sunday December 06, 2020 @08:29PM (#25328496)
"Stockholm syndrome" suggests a lot more "aren't mentally capable of" than "wonder if they have".

And the answer to the question "I wonder if any C++ developer has ever given other languages a chance" is also a quite obviously "yes" (remember, the claim was about "all"), not "no, they never have".

Re:Std::visit is everything wrong with modern C++ (2017) by tener on Saturday December 05, 2020 @10:27AM (#25315205)
Simple using which metric? As far as programming languages go, C++ is one of the most complex ones. Which is funny because e.g. Haskell has way more advanced type system and still is easier to understand.