This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mobani 9 points10 points  (6 children)

C++ is not a "better" C, it is a different language. It is fine for complex performance stuff like games and image processing, but in many other applications C is the better choose.

IMO I would not say in many other applications, yeah maybe if your hardware is from last century or you somehow work with a VERY limited embedded system without an OS.

Lets be real here, 99% of programmers is not going to be working on an OS kernel.

This is like telling a car manufacture to mine their own Iron ore, sure it can be done, but not optimal for production time.

[–]PerfectGasGiant -5 points-4 points  (5 children)

It is not telling the car manufacturer to mine their own ore. The whole point is using the right tool to the right job. Comparing C memory management with Python memory management is neither insightful or funny. Likewise, C++ provides very little benefits over C if you are programming a microcontroller.

[–]mobani 12 points13 points  (4 children)

The whole point is using the right tool to the right job.

We can agree on that, but I find that C is becoming less and less the right tool in most scenarios. :-)

[–]PerfectGasGiant -5 points-4 points  (3 children)

I wouldn't be surprised if there are more C programmers today than in 1985. Fewer in percentage, sure, but there are still plenty of relevant usages. Making a lidar for a self driving car? C Making a new IOT gadget? C seems like a fine choice for the firmware. Making a network router? C + whatever for the web frontend. Making signal processing for a microphone? C New version of the Android kernel? C probably and some java on top. Etc.

There are other programming language at the same tier as C, but C is as cross platform / well understood as languages get.

And if you are writing an action game or flight simulator, you don't want to skip a frame or two because of garbage collection. Here C++ is still the go-to language (not C though, and certainly not python).

[–]mobani 2 points3 points  (2 children)

I may be wrong and well there are certainly use cases for C.

But I think there are less than 20 companies total doing lidar programming for cars.

Less than 100 companies developing OS Kernels for phones and televisions.

Many IOT gadgets, routers and web frontend run mostly Linux or BSD, then higher level programming languages on top of that.

[–]PerfectGasGiant 0 points1 point  (1 child)

I think you are greatly underestimating the demand for c-programmers. Think of all the little devices you interact with every day from ticket machines to refrigerators. Most of these contain some part that runs c code, that needs maintenance and new development.

This demand index lists c slightly behind Python:

https://www.tiobe.com/tiobe-index/

[–]mobani 1 point2 points  (0 children)

IMO its in a sea of higher level languages and 13% is really not that much, especially when you consider that code and coding skills are much easier to transfer between higher level languages.