Re: C++ in embedded systems
From: Bill Pringlemeir (spam_account_at_sympatico.ca)
Date: 08/22/03
- Previous message: Peter Wallace: "Re: modding IDE cable to write-protect compact flash?"
- In reply to: Martin Vuille: "Re: C++ in embedded systems"
- Next in thread: Kenneth Porter: "Re: C++ in embedded systems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Aug 2003 22:55:29 -0400
On 19 Aug 2003, jpmv27@yahoo.com wrote:
>> A programmer can buy this library without the fear that it uses
>> exceptions or templates. A good thing (TM) imho.
>
> How does EC++ make this easier than a simple line of text in the
> description of the library that would state "does not use exceptions
> or templates"?
...And/or RTTI. You were completely write about all C++ style casts.
Only dynamic cast is requiring RTTI support. I believe GCC will
automatically warn about this if -fno-rtti is used. I guess this
should be implicit.
I think that having the Standard does help to quantify what library
facilities are used. Does the average programmer have time to
quantify every aspect of the language. Getting the compiler options
correct with a binary only distribution can be problematic.
I would be much more likely to buy/use a library that was Embedded
'C++' compatible. Even after reading the working groups paper on C++
performance, I think that exceptions are too expensive for my embedded
devices with the compiler that is bundled with the OS. In fact I
believe that stack tracing and tables will alway be more expensive in
code space than letting a watch dog go. In the WG21 paper sighted,
the exit/reset on error conditions didn't seem to be compared to EH
overhead. Exit/reset on error are often used for simplicity and
safety in embedded systems... at least that has been my experience,
but maybe I am some sort of horrible barbarian.
I do think that at some point linkers and compilers will become mature
enough ( and host computers will be fast enough) that templates will
be useable and beneficial in the embedded space. But I have never
seen a compiler that handle templates well enough for my needs.
Of course you can explicitly spell out every condition that a library
adheres too, instead of just saying "Embedded C++ compliant". Just
like you can do everything in assembly that you can do in C++.
fwiw,
Bill Pringlemeir.
-- If I gave a damn, you'd be the first person I'd give it to.
- Previous message: Peter Wallace: "Re: modding IDE cable to write-protect compact flash?"
- In reply to: Martin Vuille: "Re: C++ in embedded systems"
- Next in thread: Kenneth Porter: "Re: C++ in embedded systems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|