General > General Technical Chat
How many people code in C these days, and if so, why?
<< < (5/99) > >>
Karel:

--- Quote from: IanB on May 03, 2020, 05:07:43 pm ---
--- Quote from: Karel on May 03, 2020, 05:03:44 pm ---Maybe I'm an exception but all non-GUI software I write for the pc is written in C using gcc, not g++!

--- End quote ---

If you invoke gcc on a file with .cpp extension it will use the C++ compiler unless you force it to do otherwise. Similarly, if you invoke gcc on a file with a .c extension, then it will use the C compiler by default. So if your files have a .c extension, then I will agree that you are using C.

--- End quote ---


Yes, my files have .c extensions.
rstofer:
How many of the advanced features of C++ are used in the Linux operating system?  I don't know the answer but I think it is zero.  Linux is written in C.  I'm pretty sure Windows is as well.  Both are really huge code bases but somehow it all works out.

I have spent about 20 years trying to build up any enthusiasm for C++ and I just can't get there.  I'm just too old to learn C++ and, since I'm not trying to cure world hunger, I don't see any reason to bother.  Most of my work is in the embedded space and C++ doesn't bring much to the dance.

I'll stick with Fortran and C while the world moves on.
engrguy42:

--- Quote from: rstofer on May 03, 2020, 05:39:22 pm ---
I have spent about 20 years trying to build up any enthusiasm for C++ and I just can't get there. 


--- End quote ---

I hear ya...but if you want a lot of fun try writing a ray tracer for 3D graphics.  :-+

It's a ton of fun, and C++ is almost mandatory. Although I think C and C++ are pretty much interchangeable with those graphics API's.

And then tie that into a C# interface and GUI.  :-+

And yeah, I have lots of fond memories of Fortran  :D

Are there still compilers available for that?? Hmm.......
nctnico:

--- Quote from: IanB on May 03, 2020, 03:42:33 pm ---If you do write in C these days, what is the reason? Is it because there is no C++ compiler for your target hardware, or are there special advantages to C that make you prefer it?

--- End quote ---
I code a lot in C. Mostly on microcontrollers and projects which where written in C. If I have a chance I like to use C++. Using objects makes for cleaner interfaces (like having functions with default arguments and the same functions with different parameters) and I like that I can avoid pointers in C++. And then there is the STL library which has many useful features. I'm not saying C++ is perfect for everything. I use Lua as well and likely Python will be added at some point.
Kjelt:

--- Quote from: IanB on May 03, 2020, 03:42:33 pm ---If you do write in C these days, what is the reason? Is it because there is no C++ compiler for your target hardware, or are there special advantages to C that make you prefer it?

--- End quote ---
I graduated in the 90s became an EE , since then had 12 SW jobs with 5 companies and I solely have written C and now for the testing some Python.
First companies the target was 64kB upto 1MB with 100-200klocs
Last company is 650+MB code, est. 300+Mlocs and growing, I luckily only work wit 20Mlocs of that, and still everything except the unittests and other tests is in C.

Why? Because the companies use it and want it and it still is the defacto standard for serious industrial machines and real time hardware. If you program GUIs or games or internet stores, websites etc. choose something more appropriate for that.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod