3 ms·
Well, the farther you abstract away from executable machine code the greater the inefficiencies introduced into the resulting machine code. Object oriented pro
by robomartin 14y ago
Well, the farther you abstract away from executable machine code the greater the inefficiencies introduced into the resulting machine code. Object oriented programming is there for the benefit of the programmer, the machine couldn't care less. The trouble is that any OO language will introduce unnecessary code into any given program. What I mean by "unnecessary" is that, if you were coding the solution in assembler you would, in all likelihood, not produce such code.
C let's you code at a level that is extremely close to the underlying machine language. If you are an experienced embedded developer you'll know exactly what code you are producing for the particular processor you happen to be working with.
I would not venture a guess, but I would not be surprised if the overwhelming majority of real-time, mission-critical systems out there are coded in C. The only other language I would consider would be Forth --which I have used extensively. I have played with the idea of going to something like C++. I have never found it to make sense in the context of a resource and horsepower-limited embedded system.
I don't know where the distain for C comes from. Yes, I am aware of the issues on can run into by writing unsafe code. Isn't part of our job to write safe code? I certainly do.