News for hackers. Stuff that matters.
Re:Convincing C programmers to switch to C++: A look at huma... by ryandrake on Friday June 02, 2017 @12:08PM (#14470944)
Why 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 if it's appropriate. If I'm joining a project in-progress, I'm happy to use whatever language has already been chosen. Why get into religious wars?
Re:Convincing C programmers to switch to C++: A look at huma... by taloft on Friday June 02, 2017 @12:38PM (#14471227)
According to Alan Kay, programming is a pop culture right now. So people want to preserve the investment in the language of their choice by maintaining or improving its pop status.
Re:Convincing C programmers to switch to C++: A look at huma... by deathanatos on Friday June 02, 2017 @12:35PM (#14471202)
> Why do programmers feel the need to convince other programmers to switch to a different language?

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 huma... by sqeaky on Friday June 02, 2017 @01:10PM (#14471558)
Because:

I don't want to maintain a giant heap of buggy C Code.

I don't want to deal with bugs in the JVM/JNI.

I want ownership semantics expressed in code. When a C functions accepts or return a pointer who deletes it?

I want code to be easily tested, automatically. Common C code has so much shared mutable state that unit tests are rare, and when used are trumpeted as masterworks of engineering like the sqllite test suite.

C makes all these things hard or impossible to work with. From my perspective, the only positive it brings in the standardized ABI.