Convincing C programmers to switch to C++: A look at human behavior (2016)
51–60 of 87 posts
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#52C++ offers too many options for how to do things. C is a nicely restrained subset. The end.
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#53Disclaimer: I don't love C++, I think it has lots of problems, but saying C++ is wrong, while C is right suggests to me that lots of people didn't take time to actually learn C++ but have strong opinions on it.
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#54In 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)
#55In 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)
#56Why do programmers feel the need to convince other programmers to switch to a different language? How does it affect Programmer A, a C++ programmer, whether or not programmer B prefers to use C? I like both C and C++. I also like Objective-C, Ruby, and Python. Each one has its place--and if I'm starting a new project, I'll use the one that makes the most sense to use given the project's requirements--or a mix of them…
Because they themselves derived some benefit from it, and believe the other party would too, if only they would try it.
Sometimes, I don't think it's just benefits, but certain languages offer different ways of doing things that other languages really could benefit from. Our older languages teach us things as we use them, like that nullable pointers as our only reference type were a bad idea. Encouraging others to use languages that adopt different ideals would seem to be to just be people trying to get people to see the merits of those ideals.
> Why get into religious wars?
Because we're still using languages with nullable pointers. More seriously, because people care about the quality of their work, and you don't always get to pick the tool for the job. And it can very well be that there isn't a good tool for the job, but only and okay tool for the job: while I use Python extensively at my job, and while its speed of development definitely benefits my team, I would kill for some static typing. (I've been looking into mypy for this reason, but being on Python 3 would help…)
And people don't always use the right tool for the job, or I'd be done trying to explain why they should not be using raw bytestrings for text. They didn't pick the wrong tool for the job — they simply don't understand that actual string types exist, or why they should use them. (It doesn't help when the language/library's obvious choice is the wrong choice.)
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#57Why do programmers feel the need to convince other programmers to switch to a different language? How does it affect Programmer A, a C++ programmer, whether or not programmer B prefers to use C? I like both C and C++. I also like Objective-C, Ruby, and Python. Each one has its place--and if I'm starting a new project, I'll use the one that makes the most sense to use given the project's requirements--or a mix of them…
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#58 “If you’re arguing, you’re losing.” — Mike Thomas
No, no, no.A shouting match doesn't help anybody. A civilized exchange of arguments does. And the establishment of evaluation criteria is a very good basis for listening to the other.
The not-arguing approach often times results in "let me show the merits of my technology without listening to your requirements / evaluation criteria".
C is different from C++ because it targets different use cases. So it needs to be evaluation in the context of use cases. End of story.
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#59People 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.
> And so by following your heart instead of your head, you sometimes make seemingly illogical but objectively better decisions. And sometimes you make seemingly illogical decisions that end up being objectively worse decisions. The problem is that we don't really have a way to quantify our emotions usefully, which means we can use them accurately and are forced to allow for enormous amounts of error in our calculatio…
Re: Convincing C programmers to switch to C++: A look at human behavior (2016)
#60A good example of human behavior in TFA as well as the talk it cites is how deeply convinced they are that C++ is objectively always better than C; they don't even try to suggest that there could be a tradeoff and sometimes C would be better. Of course the guy in the talk makes a living from C++ consulting; another part of human behavior is it's hard to convince someone of a truth which threatens their paycheck. And…
> And I'm not here to argue how terrible C++ is (I've done enough of that elsewhere) Haha that's one way to put it :p For those new to this debate: Yosef Kreinin is the author of the (in)famous C++ Frequently Questioned Answers.[0] it's quite a body of work. Speaking of which: thanks for writing it, Yosef. I greatly enjoyed reading it back in the day, and it had a big impact on young me. [0] http://yosefk.com/c++fqa/