|
Re: C or C++
I'm going to try to clarify somethings about using OOP on the current breed of controllers.
Using any kind of memory management on the PIC18s would incur a performance penalty in terms of pointers, indirect addressing, management overhead, etc. I don't care how few malloc()/free() calls there are; it only takes one. In order to perform indirect addressing, you have to copy the pointer to a special register. Every dereference requires this, on a byte-by-byte basis. I'm not even sure you can perform an indirect function call. (Remember, code is stored seperate from data.)
I agree that using OOP principles is a Good Thing(tm). But the limits of the PIC18 processors are such that full-blown OOP (or even just objects) as it is normally implemented is impractical.
|