C++ maybe?

Post your requests and ideas on the future development of mikroC PRO for PIC.
Post Reply
Author
Message
cj_tomekk
Posts: 12
Joined: 20 Apr 2009 09:56

C++ maybe?

#1 Post by cj_tomekk » 03 Jun 2010 10:52

How about adding classes? It needs extra stack call but many projects would live with that :-) And it would be very handy...

womai
Posts: 239
Joined: 16 Apr 2008 07:45

Re: C++ maybe?

#2 Post by womai » 04 Jun 2010 23:48

C++ hardly gets used for microcontrollers because it has large overhead both in terms of memory requirements and in terms of execution time. Actually the use of C++ for embedded development has greatly decreased over the last 10 years or so after some initial hype; now C is almost completely dominant (somewhere around 70% of the projects, the rest being C++, other high-level languages, and assembler).

Wolfgang

User avatar
anikolic
mikroElektronika team
Posts: 1775
Joined: 17 Aug 2009 16:51
Location: Belgrade
Contact:

Re: C++ maybe?

#3 Post by anikolic » 07 Jun 2010 11:38

Hello,

I think womai explained most of the reasons why. Our management evaluated the necessity for such development and investing so much energy into developing C++ compiler (at least for now) would really not produce as much results as it is needed. However, we are always open for suggestions and comments, and if it turns out that there are many requests for C++, we might reconsider our current position and involve into producing one.

Best regards,
Aleksandar
Web Department Manager

johnt
Posts: 204
Joined: 01 Jul 2010 13:24

Re: C++ maybe?

#4 Post by johnt » 01 Jul 2010 14:06

I would much rather have a well supported Forth compiler.
C++ I would (and do) go out of my way to avoid.

john

Rocket

Re: C++ maybe?

#5 Post by Rocket » 21 Aug 2010 05:36

Hello ...

The beauty with OOP (object orientated programming) is code re-usability, maintainability and enhanced clarity of the code.

I agree that with most MCUs, the benefits don't outweigh the limitations that would arise. The language would consume much more of the micro's memory and computing power. However, I wonder if some of these newer breeds of MCUs which boast a much larger degree of memory and computing power, could perhaps seem as suitable candidates for OOP.

If your typical programmer has around say 20% of unused program memory and computing horsepower for the taking, then it does make sense to consider OOP, at least in my mind.

Try making a decent video game without using OOP -- you'll likely do your head in with it. Fact: OOP was invented some 20 years ago to solve a rather big problem, large scale projects were failing with the use of traditional procedural-based languages. Too messy and unmaintainable basically.

Kind regards,

Leo Simpleson

johnt
Posts: 204
Joined: 01 Jul 2010 13:24

Re: C++ maybe?

#6 Post by johnt » 26 Aug 2010 10:44

OOP is a means to an end and has little to do with the language you use.
(I first implemented OOP from Dick Pountains Forth book - I remember
reading the first articles in Byte when the concepts were being suggested -
at the time I think they were calling it "re-usable code" or "software-ICs")

C++ is a seriously poor quality language that put many large projects
(notably telecoms ones) in serous trouble.

I doubt it would be sensible to even consider C++ for embedded applications for a whole host of reasons.
Just my own view of course.

john

Post Reply

Return to “mikroC PRO for PIC Wish List”