473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

What is EC++?

What is EC++?

Nov 23 '06 #1
22 2531
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.

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Nov 23 '06 #2

"Phlip" <ph******@yahoo.comwrote in message
news:t3*****************@newssvr21.news.prodigy.ne t...
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.

and cheesecutters.
--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!


Nov 23 '06 #3
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.
--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!


Nov 23 '06 #4
"Phlip" <ph******@yahoo.comwrote in message
news:l8*****************@newssvr21.news.prodigy.ne t...
>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.
Nov 23 '06 #5
Chris Thomasson wrote:
"Phlip" <ph******@yahoo.comwrote in message
news:l8*****************@newssvr21.news.prodigy.ne t...
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

Nov 23 '06 #6

Greg wrote:
Chris Thomasson wrote:
"Phlip" <ph******@yahoo.comwrote in message
news:l8*****************@newssvr21.news.prodigy.ne t...
>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?

Nov 23 '06 #7
>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.

Ben
Nov 23 '06 #8
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.

regards,

Zara
Nov 23 '06 #9
benben wrote:
>
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 ?

Nov 23 '06 #10
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) {}

;)
Nov 23 '06 #11
"Zara" <me*****@dea.spamcon.orgwrote in message
news:1h********************************@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.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Nov 23 '06 #12
Gernot Frisch wrote:
>
>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++?

Nov 23 '06 #13
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.

Nov 23 '06 #14
Zara wrote:
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.
>
Nov 23 '06 #15
Gernot Frisch wrote:
for(int i=0; i<num; ++i) {}
That's in C too.
At least in the last, unpopular, version.
Nov 23 '06 #16
44****@email.com wrote:
>>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.
Nov 23 '06 #17
Mathias Gaunard wrote:
44****@email.com wrote:
>>>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.
Nov 23 '06 #18
Old Wolf wrote:
benben wrote:
>>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.
Nov 23 '06 #19

"P.J. Plauger" <pj*@dinkumware.comwrote in message
news:qa******************************@giganews.com ...
"Zara" <me*****@dea.spamcon.orgwrote in message
news:1h********************************@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.

Tony
Dec 8 '06 #20
"Tony" <rd**************@sbcglobal.netwrote in message
news:Oa****************@newssvr12.news.prodigy.net ...
"P.J. Plauger" <pj*@dinkumware.comwrote in message
news:qa******************************@giganews.com ...
>"Zara" <me*****@dea.spamcon.orgwrote in message
news:1h********************************@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...

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Dec 8 '06 #21

Rolf Magnus wrote:
Gernot Frisch wrote:
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...

Dec 8 '06 #22

"P.J. Plauger" <pj*@dinkumware.comwrote in message
news:kq******************************@giganews.com ...
"Tony" <rd**************@sbcglobal.netwrote in message
news:Oa****************@newssvr12.news.prodigy.net ...
>"P.J. Plauger" <pj*@dinkumware.comwrote in message
news:qa******************************@giganews.co m...
>>"Zara" <me*****@dea.spamcon.orgwrote in message
news:1h********************************@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
Dec 8 '06 #23

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: thecrow | last post by:
Alright, what the hell is going on here? In the following code, I expect the printed result to be: DEBUG: frank's last name is burns. Instead, what I get is: DEBUG: frank's last name is...
112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
24
by: Michael B Allen | last post by:
I use long longs occasionally. I know there are some limitations regarding the standards such as not using long long constants but what's the big deal? Why is long long not used so much? Mike
6
by: Peder Y | last post by:
Surely, anyone can read it's attributes and methods... Now, how does Image store the image data? How does it discern between e.g. jpg, gif and bmp. Does it know it's own size, or does one need to...
16
by: Ajay | last post by:
Hi all, i want to know when i create a class.what all it contains.I know the following things are there by default if i do not declare them by myself.Please tell the other things that are left. ...
26
by: puzzlecracker | last post by:
It'd be interesting to compare the learning practices of c++ practitioners. I'll start with mine The C++ Programming Language C++ Primer Effective C++ More Effective C++ Effective STL The...
4
by: James | last post by:
What does this mean? 'To specify more than the first argument, you must use the MsgBox function in an expression' I'd love to see an example. Thanks!
2
by: arthurzzk | last post by:
<bean id="sesFactoryWeb" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"><ref local="XXXXXX"/></property> <property...
0
by: okonita | last post by:
Hi all, I am having a DB2 connectivity problem that I hope someone can help me resolve. I need this to test Replication and such other things. What am I doing wrong here? Any help that I can get...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.