What is EC++? | | | re: What is EC++?
dick wrote: "Embedded C++" - an attempt to create a C++ and Standard Library with a
small footprint, to fit in embedded devices like earrings.
--
Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! | | | | re: What is EC++?
"Phlip" <phlipcpp@yahoo.comwrote in message
news:t399h.2786$yf7.1285@newssvr21.news.prodigy.ne t... Quote:
dick wrote:
> >
"Embedded C++" - an attempt to create a C++ and Standard Library with a
small footprint, to fit in embedded devices like earrings.
>
and cheesecutters. | | | | re: What is EC++?
dick wrote: Quote:
> >
"Embedded C++" - an attempt to create a C++ and Standard Library with a
small footprint, to fit in embedded devices like earrings.
Lest a language lawyer jump down my throat, let me clarify.
It's an attempt to create a language with fewer features than C++,
supporting a library with fewer features than The Standard Library. So this
new language will have a smaller footprint. | | | | re: What is EC++?
"Phlip" <phlipcpp@yahoo.comwrote in message
news:l899h.2787$yf7.2161@newssvr21.news.prodigy.ne t... Quote: Quote:
>dick wrote:
>> >>
>"Embedded C++" - an attempt to create a C++ and Standard Library with a
>small footprint, to fit in embedded devices like earrings.
>
Lest a language lawyer jump down my throat, let me clarify.
>
It's an attempt to create a language with fewer features than C++,
supporting a library with fewer features than The Standard Library. So
this new language will have a smaller footprint.
Nit picking here... Sorry! ;^)
Why change C++ std. at all then... Just create an ad-hoc coding standard for
the particular embedded device, or family of devices, and stick to it. The
coding standard can weed out anything that it considered to have to much
overhead. | | | | re: What is EC++?
Chris Thomasson wrote: Quote:
"Phlip" <phlipcpp@yahoo.comwrote in message
news:l899h.2787$yf7.2161@newssvr21.news.prodigy.ne t... Quote: Quote:
dick wrote:
>
>What is EC++?
>
"Embedded C++" - an attempt to create a C++ and Standard Library with a
small footprint, to fit in embedded devices like earrings.
Lest a language lawyer jump down my throat, let me clarify.
It's an attempt to create a language with fewer features than C++,
supporting a library with fewer features than The Standard Library. So
this new language will have a smaller footprint.
>
>
Nit picking here... Sorry! ;^)
>
Why change C++ std. at all then... Just create an ad-hoc coding standard for
the particular embedded device, or family of devices, and stick to it. The
coding standard can weed out anything that it considered to have to much
overhead.
EC++ is C++ without templates, RTTI, exceptions, namespaces,
static_cast, reinterpret_cast and const_cast.
Essentially EC++ eliminated those C++ features deemed to have too much
overhead for an embedded system, and a few features (like namespaces
and the cast operators) that have zero overhead.
Greg | | | | re: What is EC++?
Greg wrote: Quote:
Chris Thomasson wrote: Quote:
"Phlip" <phlipcpp@yahoo.comwrote in message
news:l899h.2787$yf7.2161@newssvr21.news.prodigy.ne t... Quote:
>dick wrote:
>>
>>What is EC++?
>>
>"Embedded C++" - an attempt to create a C++ and Standard Library with a
>small footprint, to fit in embedded devices like earrings.
>
Lest a language lawyer jump down my throat, let me clarify.
>
It's an attempt to create a language with fewer features than C++,
supporting a library with fewer features than The Standard Library. So
this new language will have a smaller footprint.
Nit picking here... Sorry! ;^)
Why change C++ std. at all then... Just create an ad-hoc coding standard for
the particular embedded device, or family of devices, and stick to it. The
coding standard can weed out anything that it considered to have to much
overhead.
>
EC++ is C++ without templates, RTTI, exceptions, namespaces,
static_cast, reinterpret_cast and const_cast.
>
Essentially EC++ eliminated those C++ features deemed to have too much
overhead for an embedded system, and a few features (like namespaces
and the cast operators) that have zero overhead.
>
Greg
what is the overhead of templates? | | | | re: What is EC++?
>EC++ is C++ without templates, RTTI, exceptions, namespaces, Quote: Quote:
>static_cast, reinterpret_cast and const_cast.
>>
>Essentially EC++ eliminated those C++ features deemed to have too much
>overhead for an embedded system, and a few features (like namespaces
>and the cast operators) that have zero overhead.
>>
>Greg
>
what is the overhead of templates?
>
When improperly designed, templates lead to code bloat. That is, one
copy of code per instantiation.
I don't see why there should be overhead for namespaces, static_cast,
reinterpret_cast and const cast, however.
Ben | | | | re: What is EC++?
On Thu, 23 Nov 2006 17:32:27 +1100, benben
<benhonghatgmaildotcom@nospamwrote: Quote: Quote: Quote:
>>EC++ is C++ without templates, RTTI, exceptions, namespaces,
>>static_cast, reinterpret_cast and const_cast.
>>>
>>Essentially EC++ eliminated those C++ features deemed to have too much
>>overhead for an embedded system, and a few features (like namespaces
>>and the cast operators) that have zero overhead.
>>>
>>Greg
>>
>what is the overhead of templates?
>>
>
>When improperly designed, templates lead to code bloat. That is, one
>copy of code per instantiation.
>
>I don't see why there should be overhead for namespaces, static_cast,
>reinterpret_cast and const cast, however.
>
EC++ was designed in a time when C++ was not very sure of itsefl.
Designers of EC++ removed all features that were suspicious at that
time. Should EC++ be rewritten, lots of this features would be
admitted.
IMHO, EC++ should be C++ with the following added feature:
- The ability to disable RTTI, and thus disable exceptions and
dynamic_cast
All the rest should be retained, included std library. Customizing
allocators, new and delete is enough to make really small footprints
for embedded systems.
regards,
Zara | | | | re: What is EC++?
benben wrote: Quote:
>
When improperly designed, templates lead to code bloat. That is, one
copy of code per instantiation.
Well, that is no more code than it would have been if you
had written the same code without using templates.
EC++ is puzzling to me at best; it removes the most
useful features of C++ for no apparent reason. How is
it better than C ? | | | | re: What is EC++? Quote:
EC++ is puzzling to me at best; it removes the most
useful features of C++ for no apparent reason. How is
it better than C ?
for(int i=0; i<num; ++i) {}
;) | | | | re: What is EC++?
"Zara" <me_zara@dea.spamcon.orgwrote in message
news:1hpam2lvm1j8fqfej0qqh8n2cpqrtc9g9d@4ax.com... Quote:
On Thu, 23 Nov 2006 17:32:27 +1100, benben
<benhonghatgmaildotcom@nospamwrote:
> Quote: Quote:
>>>EC++ is C++ without templates, RTTI, exceptions, namespaces,
>>>static_cast, reinterpret_cast and const_cast.
>>>>
>>>Essentially EC++ eliminated those C++ features deemed to have too much
>>>overhead for an embedded system, and a few features (like namespaces
>>>and the cast operators) that have zero overhead.
>>>>
>>>Greg
>>>
>>what is the overhead of templates?
>>>
>>
>>When improperly designed, templates lead to code bloat. That is, one
>>copy of code per instantiation.
>>
>>I don't see why there should be overhead for namespaces, static_cast,
>>reinterpret_cast and const cast, however.
>>
>
EC++ was designed in a time when C++ was not very sure of itsefl.
Designers of EC++ removed all features that were suspicious at that
time. Should EC++ be rewritten, lots of this features would be
admitted.
>
IMHO, EC++ should be C++ with the following added feature:
- The ability to disable RTTI, and thus disable exceptions and
dynamic_cast
>
All the rest should be retained, included std library. Customizing
allocators, new and delete is enough to make really small footprints
for embedded systems.
Mostly right. The omitted language features made sense ten years ago,
less sense now. But the library is a big win. By omitting locale
facets, the overhead for a simple "Hello world" program goes way
down. That, and a few other simplifications, is IMO the major reason
why EC++ is now so widely used in the embedded community.
P.J. Plauger
Dinkumware, Ltd. http://www.dinkumware.com | | | | re: What is EC++?
Gernot Frisch wrote: Quote:
> Quote:
>EC++ is puzzling to me at best; it removes the most
>useful features of C++ for no apparent reason. How is
>it better than C ?
>
for(int i=0; i<num; ++i) {}
>
;)
And what would you make different in C++? | | | | re: What is EC++?
what is the overhead of templates? Quote:
>
When improperly designed, templates lead to code bloat.
That is, one copy of code per instantiation.
You could point at anything in the c language and make this same
argument! Thus, this is feeble excuse. Perhaps the effort should have
been different. Rather than strip down a useful language everyone knows
and understands to where many will end up feeling limited and
handicapped for no good reason, instead write a set of relevant
guidelines and considerations for optimizing c++ for the embedded space. | | | | re: What is EC++?
Zara wrote: Quote:
IMHO, EC++ should be C++ with the following added feature:
- The ability to disable RTTI, and thus disable exceptions and
dynamic_cast
If it were to add exceptions, it would need to specify how they're
implemented.
Some implementation techniques generate more code than others. | | | | re: What is EC++?
Gernot Frisch wrote: Quote:
for(int i=0; i<num; ++i) {}
That's in C too.
At least in the last, unpopular, version. | | | | re: What is EC++? 440gtx@email.com wrote: Quote: Quote: Quote:
>>what is the overhead of templates?
>When improperly designed, templates lead to code bloat.
>That is, one copy of code per instantiation.
>
You could point at anything in the c language and make this same
argument! Thus, this is feeble excuse. Perhaps the effort should have
been different. Rather than strip down a useful language everyone knows
and understands to where many will end up feeling limited and
handicapped for no good reason, instead write a set of relevant
guidelines and considerations for optimizing c++ for the embedded space.
When the code size is really limited you would rather want to implement
genericity with void pointers.
This is, of course, way less efficient, but it needs less code.
Maybe if you could configure C++ templates to generate a single void*
instanciation instead of speciliazed ones, that could solve the problem,
since you still get type safety and all. | | | | re: What is EC++?
Mathias Gaunard wrote: Quote: 440gtx@email.com wrote:
> Quote: Quote:
>>>what is the overhead of templates?
>>>
>>When improperly designed, templates lead to code bloat.
>>That is, one copy of code per instantiation.
>>
>>
>You could point at anything in the c language and make this same
>argument! Thus, this is feeble excuse. Perhaps the effort should have
>been different. Rather than strip down a useful language everyone knows
>and understands to where many will end up feeling limited and
>handicapped for no good reason, instead write a set of relevant
>guidelines and considerations for optimizing c++ for the embedded space.
>
>
When the code size is really limited you would rather want to implement
genericity with void pointers.
This is, of course, way less efficient, but it needs less code.
>
Maybe if you could configure C++ templates to generate a single void*
instanciation instead of speciliazed ones, that could solve the problem,
since you still get type safety and all.
You don't have to go that far. If you implement genericity with void
pointers and keep the template wrapper light, it can be inlined away.
--
Ian Collins. | | | | re: What is EC++?
Old Wolf wrote: Quote:
benben wrote:
> Quote:
>>When improperly designed, templates lead to code bloat. That is, one
>>copy of code per instantiation.
>
>
Well, that is no more code than it would have been if you
had written the same code without using templates.
>
EC++ is puzzling to me at best; it removes the most
useful features of C++ for no apparent reason. How is
it better than C ?
>
It's C with classes and better type safety. Isn't that where C++
started as a better C?
--
Ian Collins. | | | | re: What is EC++?
"P.J. Plauger" <pjp@dinkumware.comwrote in message
news:qaWdnVGo-o_y6vjYnZ2dnUVZ_vSdnZ2d@giganews.com... Quote:
"Zara" <me_zara@dea.spamcon.orgwrote in message
news:1hpam2lvm1j8fqfej0qqh8n2cpqrtc9g9d@4ax.com...
> Quote:
>On Thu, 23 Nov 2006 17:32:27 +1100, benben
><benhonghatgmaildotcom@nospamwrote:
>> Quote:
>>>>EC++ is C++ without templates, RTTI, exceptions, namespaces,
>>>>static_cast, reinterpret_cast and const_cast.
>>>>>
>>>>Essentially EC++ eliminated those C++ features deemed to have too much
>>>>overhead for an embedded system, and a few features (like namespaces
>>>>and the cast operators) that have zero overhead.
>>>>>
>>>>Greg
>>>>
>>>what is the overhead of templates?
>>>>
>>>
>>>When improperly designed, templates lead to code bloat. That is, one
>>>copy of code per instantiation.
>>>
>>>I don't see why there should be overhead for namespaces, static_cast,
>>>reinterpret_cast and const cast, however.
>>>
>>
>EC++ was designed in a time when C++ was not very sure of itsefl.
>Designers of EC++ removed all features that were suspicious at that
>time. Should EC++ be rewritten, lots of this features would be
>admitted.
>>
>IMHO, EC++ should be C++ with the following added feature:
>- The ability to disable RTTI, and thus disable exceptions and
>dynamic_cast
>>
>All the rest should be retained, included std library. Customizing
>allocators, new and delete is enough to make really small footprints
>for embedded systems.
>
Mostly right. The omitted language features made sense ten years ago,
less sense now. But the library is a big win. By omitting locale
facets, the overhead for a simple "Hello world" program goes way
down. That, and a few other simplifications, is IMO the major reason
why EC++ is now so widely used in the embedded community.
It sounds like EC++ should be the first stop and Std C++ only if one
needs the advanced features. Or that Std C++ implementations should
have switches to turn off all the stuff that would make it EC++. That
would take "don't pay for what you don't use" to a nice level I think.
Tony | | | | re: What is EC++?
"Tony" <rdnewsNOSPAM2006@sbcglobal.netwrote in message
news:Oa5eh.3088$Ga1.495@newssvr12.news.prodigy.net ... Quote:
"P.J. Plauger" <pjp@dinkumware.comwrote in message
news:qaWdnVGo-o_y6vjYnZ2dnUVZ_vSdnZ2d@giganews.com... Quote:
>"Zara" <me_zara@dea.spamcon.orgwrote in message
>news:1hpam2lvm1j8fqfej0qqh8n2cpqrtc9g9d@4ax.com.. .
>> Quote:
>>On Thu, 23 Nov 2006 17:32:27 +1100, benben
>><benhonghatgmaildotcom@nospamwrote:
>>>
>>>>>EC++ is C++ without templates, RTTI, exceptions, namespaces,
>>>>>static_cast, reinterpret_cast and const_cast.
>>>>>>
>>>>>Essentially EC++ eliminated those C++ features deemed to have too
>>>>>much
>>>>>overhead for an embedded system, and a few features (like namespaces
>>>>>and the cast operators) that have zero overhead.
>>>>>>
>>>>>Greg
>>>>>
>>>>what is the overhead of templates?
>>>>>
>>>>
>>>>When improperly designed, templates lead to code bloat. That is, one
>>>>copy of code per instantiation.
>>>>
>>>>I don't see why there should be overhead for namespaces, static_cast,
>>>>reinterpret_cast and const cast, however.
>>>>
>>>
>>EC++ was designed in a time when C++ was not very sure of itsefl.
>>Designers of EC++ removed all features that were suspicious at that
>>time. Should EC++ be rewritten, lots of this features would be
>>admitted.
>>>
>>IMHO, EC++ should be C++ with the following added feature:
>>- The ability to disable RTTI, and thus disable exceptions and
>>dynamic_cast
>>>
>>All the rest should be retained, included std library. Customizing
>>allocators, new and delete is enough to make really small footprints
>>for embedded systems.
>>
>Mostly right. The omitted language features made sense ten years ago,
>less sense now. But the library is a big win. By omitting locale
>facets, the overhead for a simple "Hello world" program goes way
>down. That, and a few other simplifications, is IMO the major reason
>why EC++ is now so widely used in the embedded community.
>
It sounds like EC++ should be the first stop and Std C++ only if one
needs the advanced features. Or that Std C++ implementations should
have switches to turn off all the stuff that would make it EC++. That
would take "don't pay for what you don't use" to a nice level I think.
Yep. That's pretty much the option(s) we provide with our current
library package -- you get both EC++ and full Standard C++, with a
couple of blends in the middle. Ironically, EC++ in the embedded
community has proved to be a good stepping stone toward the use of
full C++. Those who fulminate against EC++ might be chagrined to
learn that it has been an excellent recruiting tool...
P.J. Plauger
Dinkumware, Ltd. http://www.dinkumware.com | | | | re: What is EC++?
Rolf Magnus wrote: Quote:
Gernot Frisch wrote:
> Quote: Quote:
EC++ is puzzling to me at best; it removes the most
useful features of C++ for no apparent reason. How is
it better than C ?
for(int i=0; i<num; ++i) {}
;)
>
And what would you make different in C++?
That *is* the C++ version... | | | | re: What is EC++?
"P.J. Plauger" <pjp@dinkumware.comwrote in message
news:kq6dnVU5uPFXW-TYnZ2dnUVZ_ruknZ2d@giganews.com... Quote:
"Tony" <rdnewsNOSPAM2006@sbcglobal.netwrote in message
news:Oa5eh.3088$Ga1.495@newssvr12.news.prodigy.net ...
> Quote:
>"P.J. Plauger" <pjp@dinkumware.comwrote in message
>news:qaWdnVGo-o_y6vjYnZ2dnUVZ_vSdnZ2d@giganews.com... Quote:
>>"Zara" <me_zara@dea.spamcon.orgwrote in message
>>news:1hpam2lvm1j8fqfej0qqh8n2cpqrtc9g9d@4ax.com. ..
>>>
>>>On Thu, 23 Nov 2006 17:32:27 +1100, benben
>>><benhonghatgmaildotcom@nospamwrote:
>>>>
>>>>>>EC++ is C++ without templates, RTTI, exceptions, namespaces,
>>>>>>static_cast, reinterpret_cast and const_cast.
>>>>>>>
>>>>>>Essentially EC++ eliminated those C++ features deemed to have too
>>>>>>much
>>>>>>overhead for an embedded system, and a few features (like namespaces
>>>>>>and the cast operators) that have zero overhead.
>>>>>>>
>>>>>>Greg
>>>>>>
>>>>>what is the overhead of templates?
>>>>>>
>>>>>
>>>>>When improperly designed, templates lead to code bloat. That is, one
>>>>>copy of code per instantiation.
>>>>>
>>>>>I don't see why there should be overhead for namespaces, static_cast,
>>>>>reinterpret_cast and const cast, however.
>>>>>
>>>>
>>>EC++ was designed in a time when C++ was not very sure of itsefl.
>>>Designers of EC++ removed all features that were suspicious at that
>>>time. Should EC++ be rewritten, lots of this features would be
>>>admitted.
>>>>
>>>IMHO, EC++ should be C++ with the following added feature:
>>>- The ability to disable RTTI, and thus disable exceptions and
>>>dynamic_cast
>>>>
>>>All the rest should be retained, included std library. Customizing
>>>allocators, new and delete is enough to make really small footprints
>>>for embedded systems.
>>>
>>Mostly right. The omitted language features made sense ten years ago,
>>less sense now. But the library is a big win. By omitting locale
>>facets, the overhead for a simple "Hello world" program goes way
>>down. That, and a few other simplifications, is IMO the major reason
>>why EC++ is now so widely used in the embedded community.
>>
>It sounds like EC++ should be the first stop and Std C++ only if one
>needs the advanced features. Or that Std C++ implementations should
>have switches to turn off all the stuff that would make it EC++. That
>would take "don't pay for what you don't use" to a nice level I think.
>
Yep. That's pretty much the option(s) we provide with our current
library package -- you get both EC++ and full Standard C++, with a
couple of blends in the middle. Ironically, EC++ in the embedded
community has proved to be a good stepping stone toward the use of
full C++. Those who fulminate against EC++ might be chagrined to
learn that it has been an excellent recruiting tool...
Worth a look when/if I actually get to the poing of BUYING development
tools and libraries.
Tony |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,295 network members.
|