General > General Technical Chat

How many people code in C these days, and if so, why?

<< < (6/99) > >>

IanB:

--- Quote from: engrguy42 on May 03, 2020, 05:45:28 pm ---And yeah, I have lots of fond memories of Fortran  :D

Are there still compilers available for that?? Hmm.......
--- End quote ---

Yup. We still maintain Fortran code at work.

There was a time when Fortran compilers could do better optimizations and produce faster code than C compilers. It may still be the case sometimes for all I know. I think there is still an arms race going on between the compiler writers.

Kjelt:
By the way, ever tried reprogramming 300Mlocs of C code that is tested and prooven over 25 years, and then start all over in another language?
How many thousands of SW engineers and hundreds of millions of $ would that cost ?

engrguy42:

--- Quote from: Kjelt on May 03, 2020, 05:52:15 pm ---
--- 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.

--- End quote ---

I assume when you're dealing with commercial/industrial products you generally want low cost and efficiency, which I assume pushes companies towards lower level languages with fewer frills and memory and hardware requirements and costs. So I imagine C and ASM and the lower level stuff are the go-to languages in those environments.

IanB:

--- Quote from: Kjelt on May 03, 2020, 05:52:15 pm ---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.

--- End quote ---

I think there is a large space for industrial and scientific software between those two extremes. For instance, would you rather write a Spice circuit simulator in C or C++?

engrguy42:

--- Quote from: IanB on May 03, 2020, 05:58:18 pm ---
--- Quote from: Kjelt on May 03, 2020, 05:52:15 pm ---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.

--- End quote ---

I think there is a large space for industrial and scientific software between those two extremes. For instance, would you rather write a Spice circuit simulator in C or C++?

--- End quote ---

I don't think it's an either/or proposition necessarily. I can imagine writing the GUI for a Spice simulator in C# since it's so quick and easy, but for the core simulation stuff you might want to write it in the most optimizable and fast language (maybe on that has ready access to pertinent math libraries) needed for the actual timestep simulation stuff. And if you're writing it for specific hardware to speed up simulations (like a GPU, for example) that adds another consideration, depending on the best API for that hardware.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod