Re: Why We Use C Than C++...
- From: henryk.mueller@xxxxxx
- Date: 13 Jan 2006 03:12:32 -0800
Dag-Erling Smørgrav schrieb:
> > C++ is not faster or slower than C if you DO the same.
>
> in which case there is no point in chosing C++ over C.
Well, the point is that you can do a lot more with C++ - if you want!
I think kernel programming and embedded programming have a lot in
common. If you come from, let's say PC application programming where
speed and size of your code do not matter because your system has
plenty of it, then you first need to learn to write lean C++ code - and
to avoid some C++ features:
- virtual functions
- exceptions
- rtti
- templates (if your compiler is not able to)
- a.s.o.
Still, there are a lot of C++ features left that are worth using them
in embedded environments. If you understand, what happens "behind the
scenes" of your code, then C++ is very powerful even in embedded
systems.
I personally really like the beauty and robustness of a lean interface
wrapper class that looks very sophisticated from the outside but
actually contains only a lot of inline stuff that gets and sets some
port registers...
For my part, I think that plain C just looks ugly and is so damn old
school... ;o)
.
- Follow-Ups:
- Re: Why We Use C Than C++...
- From: Richard Heathfield
- Re: Why We Use C Than C++...
- References:
- Why We Use C Than C++...
- From: sonugeetha@xxxxxxxxx
- Re: Why We Use C Than C++...
- From: Richard Heathfield
- Re: Why We Use C Than C++...
- From: Dag-Erling Smørgrav
- Re: Why We Use C Than C++...
- From: henryk . mueller
- Re: Why We Use C Than C++...
- From: Dag-Erling Smørgrav
- Why We Use C Than C++...
- Prev by Date: Re: getting current date in C in the VC environ
- Next by Date: Re: ternary expression validity
- Previous by thread: Re: Why We Use C Than C++...
- Next by thread: Re: Why We Use C Than C++...
- Index(es):
Relevant Pages
|