Convincing C programmers to switch to C++: A look at human behavior (2016)
1–10 of 87 posts
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#2Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#3Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#4But according to OP, it's not C++ that's irrational, it's the programmers who don't want to use C++.
[0] https://twitter.com/sigfpe/status/857748171778252800 [EDIT: corrected broken link]
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#5In C++, "return (x);" isn't equivalent to "return x;" [0]. But according to OP, it's not C++ that's irrational, it's the programmers who don't want to use C++. [0] https://twitter.com/sigfpe/status/857748171778252800 [EDIT: corrected broken link]
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#6Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#7And I'm not here to argue how terrible C++ is (I've done enough of that elsewhere), but only that "behavioral" arguments cut both ways, and are usually little more than an ad hominem attack and/or some good old marketing tricks rebranded as "behavioral science."
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#8I mean, maybe the actual details of the case for switching are slightly beyond the scope the author intended to write about, but simply starting with an assertion that "modern = better, therefore people should have already switched if they were rational" and treating that as self-evident strikes me as highly arrogant and logically fallacious.
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#9- Learning to use a new system effectively takes time and energy. Are you 100% sure that the benefit of the new system is great enough to offset these costs?
- Hybrid codebases have higher maintenance costs than homogeneous ones. If Kiwi mixes with Strawberry seamlessly, maybe that burden is lower—but the more true that is, the harder it is to believe that moving to Kiwi confers a large advantage.
In this specific case, I could believe that C++ by seasoned C++ users leads to demonstrable net gains. But it's easier for me to believe that switching to Rust or Haskell would confer higher gains, corresponding to the higher risk and higher cost of switching. So I think it's not that people are irrational about avoiding C++. I think that C++ is in an awkward place on the hill between C and things better than C++. If you need something better, you will go to something with better tradeoffs than C++; if you don't need something better, you just live with your existing C codebase.
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#10People aren't rational actors for a reason: Sometimes things are easy to argue for but aren't that great in practice. And so by following your heart instead of your head, you sometimes make seemingly illogical but objectively better decisions. And I think that there is a case to be made about how C++ is efficient in theory, while C is effective in practice.
I still vastly prefer C++ over C though :P