C for embedded controllers

sandy ganz sandyg at visix.com
Mon Nov 27 22:51:42 GMT 1995


Some more change on the subject (my two cents...)

I'll agree, I have had similar experience with C++, and the related C++
zelots... It is very nice when used for a problem that it fits. Also when
using C++ in an embedded environment you must carefull of more things then
with straight C. This include things that make debugging difficult, ie,
virtual functions. It also relates back to cost, the reocurring cost of
hardware is often more important then what it will be develped in. You may
get away with C and assembler, but C++ imposes another level of overhead,
inadditon to other problems, that would make you use higher priced hardware.
For the most part
I think that for the EFI 332 project that gnu C and dabs of assembler will
be just fine! Nothing however will stop you from using the gnu C++ compiler,
if you want to take advantage of any C++ features. Just beware of the hidden
side effects of using C++ (mangled names, virtual function table overhead,
memory managment oddities, and SLOW GNU C++ compile times!).

But all this talk is useless until we get some hardware...


Sandy


At 01:53 PM 11/27/95 EST, you wrote:
>I am surprised there is not a war between C and C++, instead of
>assembler vs. C.  
>
>I will start one........
>
>I have been using C++ on a major project (a accelerator simulation)
>for the last year, and my conclusion is that C++ is 
>useful if the problem you are working on can be easily
>represented by objects.  Otherwise, use C.  It seems that everyone 
>jumping on the C++ bandwagon is programming EVERYTHING using the
>object-oriented approach, instead of using the technique best
>suited for the project.  Sort of like the neural-network bandwagon
>several years ago - people touted them as a great discovery
>and predicted the world would change using them.  
>
>Using C++ on an embedded processor code, with virtual functions
>and the like, could lead to suicide (yours).
>
>- Bruce
>
>--
>-----------------------------------------------------
><<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>-----------------------------------------------------
>               Bruce A. Bowling
>  Staff Scientist - Instrumentation and Controls
> The Continuous Electron Beam Accelerator Facility
>    12000 Jefferson Ave - Newport News, VA 23602
>                 (804) 249-7240
>                bowling at cebaf.gov  
>        http://devserve.cebaf.gov/~bowling
>-----------------------------------------------------
><<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>-----------------------------------------------------
>
**************************************
Name: sandy ganz
E-mail: sandyg at visix.com (sandy ganz)
              * __       
         \  / / (   / \/
          \/ / __) /  /\
                  *     
Date: 11/25/95
Time: 14:06:33
Machine: Bullwinkle
**************************************




More information about the Diy_efi mailing list