> -----Original Message-----
> From: openocd-development-boun...@lists.berlios.de [mailto:openocd-
> development-boun...@lists.berlios.de] On Behalf Of Michel Catudal
> Sent: donderdag 10 december 2009 0:59
> To: Freddie Chopin
> Cc: openocd-development
> Subject: Re: [Openocd-development] New object-orientated C++ architecture
> for OpenOCD?
> 
> Freddie Chopin a écrit :
> > Why everyone sees only the bad sides of C++ and completely forgets the
> > good ones? Templates? Stronger compilation-time-error-checks? Easier
> > error handling? Easier abstraction? Easier polymorphism? Easier - well -
> > everything?
> >
> >
> I will never use C++ in my embedded projects until the cost of memory is
> almost zero..
> Joke aside, I can't see how C++ can be better than C in an embedded system.

Its a trade-off between the number of units you can sell and the length of the 
development cycle. C++ comes with a bunch of libraries that make programming 
easier and less prone to bugs (STL libraries, string type, etc). You could end 
up with a shorter development cycle and a more robust product. Most of our 
products (even the little critters without OS) communicate over tcp/ip. 
Projects tend to get larger and larger because more functionality is required. 
I estimate about 5% of the C code I write has to do with range and buffer size 
checking. If a library can take care of the range checking stuff, that would 
make code more readable. Microsoft is even pushing C# into small OS-less 
embedded systems (dotnet micro framework). 

Nico Coesel

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to