Re: why still use C?

From: Mark McIntyre (markmcintyre_at_spamcop.net)
Date: 10/07/03


Date: Mon, 06 Oct 2003 23:03:07 +0100

On Mon, 06 Oct 2003 03:00:01 +0200, in comp.lang.c , Sidney Cadot
<sidney@jigsaw.nl> wrote:

(actually I'm replying to Cody - my server lost his message)

>> no this is no trollposting and please don't get it wrong but iam very
>> curious why people still use C instead of other languages especially C++.

I missed your original post, but as far as I'm concerned, the answer
is "occam's razor".
When I'm writing a simple tool to process raw data from one stream to
another, its faster (for me) to /write/ it in C, even tho C++ probably
has zero or little runtime penalty.

>> i heard people say C++ is slower than C but i can't believe that. in pieces
>> of the application where speed really matters you can still use "normal"
>> functions or even static methods which is basically the same.

But whats the point of using C++ if all you do is "dumb it down" till
it matches C?

>> in C there arent the simplest things present like constants, each struct and
>> enum have to be prefixed with "struct" and "enum". iam sure there is much
>> more.

C has constants. I'm not sure what your point is about prefixing
types. Don't you like knowing what type a type is? If so, use
typedefs.

>> i don't get it why people program in C and faking OOP features(function
>> pointers in structs..) instead of using C++. are they simply masochists or
>> is there a logical reason?

IMHO only a theoretical scientist or someone without a C++ compiler
would fake up C++'s OOP with C. If you want OOP, then use C++. OR a
language that does it even better.

-- 
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>