learning C

Werner Schiendl ws-news at gmx.at
Thu Mar 8 05:31:35 EST 2001


Remco Gerlich <scarblac at pino.selwerd.nl> wrote in message
news:slrn9adklr.bv9.scarblac at pino.selwerd.nl...
> Werner Schiendl <ws-news at gmx.at> wrote in comp.lang.python:
> > > I assumed the original poster wanted to become a good C code writer,
or at
> > > least a good C code reader.  You tell him to learn C++ instead, as if
> > learning
> > > C is obselete.
> >
> > If it is not obsolete, it should be at least considered deprecated for
new
> > projects.
>
> A baseless statement. There are many types of project for which C is still
> the best choice. For one thing, think embedded systems.
>

Would say, depends.

If you have some really simple thing to do (and those are much rarer breed
than some believe...) you are probably better of not using C++ extended
features, libraries and syntax. Especially if the code has to be inspected
externally for safety reasons.

But if you have a need for string handling, containers, dynamic object
creation and deletion, etc. you can of course do that in C, but doing it in
C++ will get you up and running much faster.

I personally use embedded platforms and C++ is readily available there
(VxWorks, to be precise).

> I can imagine something like Java deprecating C++, but C isn't going to go
> away soon.
>

I probably already would have done, if Sun did not insist on the
braindamaged approach of running a VM (even on a device that does not even
have connectors where you could download additional classes).
Considering for example the upcoming release of GNU Java compiler I think
this will become _much_ more realistic...

Consider embedded devices :-)
For safety issues I would clearly prefer Java to C++

regards
werner






More information about the Python-list mailing list