learning C

Paul Wright -$Paul$- at verence.demon.co.uk
Thu Mar 8 19:01:56 EST 2001


In article <984047775.592522 at newsmaster-04.atnet.at>,
Werner Schiendl <ws-news at gmx.at> wrote:
>
>Remco Gerlich <scarblac at pino.selwerd.nl> wrote in message
>news:slrn9adklr.bv9.scarblac at pino.selwerd.nl...
>> 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 think you have a different definition of "embedded" from me
(admittedly it's a broad term). C is still in wide use in the industry I
work in (which produces small, hard real time systems). This is unlikely
to change in the near future: C++ is perceived as being slow and unsafe.
There's the feeling that you never quite know what it's going to do.  By
contrast, C compilers are pretty efficient and what they'll end up
producing is more or less in line with what you'd expect from looking at
the code. C itself can be unsafe, of course, but by using restricted
subsets of the language you can help with this somewhat (banning dynamic
allocation is common, for example).

I don't think these systems are simple. If they were, writing them would
be a lot easier.

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

ObFourYorkshiremen: You had an OS? You were lucky! In my day we had some
interrupts and timers, and we liked it! (Actually, my current project
does have an OS: such luxury :-)

Not-speaking-for-my-employer-ly yours

Paul

-- 
----- Paul Wright ------| Nobody will ever win the battle of the sexes. There's
-paul.wright at pobox.com--| too much fraternizing with the enemy.
http://pobox.com/~pw201 | 



More information about the Python-list mailing list