📜 ⬆️ ⬇️

About languages

A few years ago, the Keil compiler vendor (now owned by ARM) placed an announcement in Embedded Systems Programming magazine (later known as Embedded Systems Design, and now embedded.com) about its new compiler: COBOL for 8051.
It was a joke, and it was placed in the April issue. What a ridiculous and absurd product idea! COBOL for embedded systems? And COBOL for 8051! I called the company president and congratulated him with a great joke.
And he told me that they received requests for delivery!

This example describes certain approaches in choosing a language for embedded systems. Expectations are more important than reality.

You cannot read Slashdot or similar websites without seeing the language discussions as they are. Is D the newest great way to write code. Or is it Swift? I get email all the time from people wanting to get information on C # firmware development. It is not uncommon to hear from someone that the whole world is moving towards Java, and those who do not, risk falling behind forever.

What do we really have? In the world of embedded systems, in the first approximation, only two languages ​​are used: C and C ++. The data of Embedded.com shows the main language used by its readers (I could not complete the picture, refer to the original, C, about 60%, C ++, about 20% in the period from 2005 to 2013, with minor deviations - PP).
Surprisingly, C ++ doesn’t even catch up with S.
')
When choosing a language, consider the presence of developers. If you cannot hire engineers who have a thorough understanding of the language, then rely on long and expensive training or prepare for failure.

I was once invited to help with a sinking project in Sweden, which was done in C ++. I thought the language was rightly chosen for this application. But why was this choice made? The company's vice president told me that he read in Business Week that C ++ speeds up development and eases code reuse, so he insisted on using it.
The company had 40 developers involved in the project, and all of them, with the exception of a recent graduate, had no experience with object-oriented programming. The remaining 39 tried to learn in the course of work. This is the road to disaster. They gained skills by moving through the project. Everything would be fine if the product was not intended for delivery.

C occupied this space for 30 years now, and there is no indication that he is leaving. It represents the best choice at the moment. I wish we could go to Ada, or, even better, to SPARK. But this will not happen until a sufficient number of trained engineers are available.

Do you think C and C ++ are with us forever?

Source: https://habr.com/ru/post/273883/


All Articles