Hacker News new | ask | show | jobs
by roedog88 6150 days ago
The article talks about how many embedded projects use C and the need for new developers. I have two thoughts about why embedded developers choose C.

One reason for this choice that I've observed is the very conservative mindset in those developing safety critical software. I think this is understandable given potentially fatal consequences for errors. The approach to safety is somewhat brute-force, write the code to strict guidelines, then test, test, and test. Changing a language or compiler would require extensive re-testing, introduce unknown risks, and the development of new guidelines.

The other big driver for embedded software is unit cost. The logic goes this way. Saving a dollar on a part used in 2 million unit saves $2M in costs. A cheaper part is selected if the part cost savings is less than the extra engineering costs needed to squeeze the functions into a smaller memory and slower chip. C, and C++ can be quite lean, while perhaps taking longer to develop than another language.