Re: The status of C
- From: dj3vande@xxxxxxxxxxxxxxxxxxx (Dave Vandervies)
- Date: Thu, 16 Jun 2005 18:05:49 +0000 (UTC)
In article <GK%pe.12113$ai7.296384@xxxxxxxxxxxxxx>,
Martin Johansen <m***@xxxxxxxxx> wrote:
>Hey guys
>
>Since C is my language of choice for almost any kind of application, I'd
>like to know what the status of C is around the world today.
>And I am ofcourse not talking about C++ or C#. I think the lack of object
>orientation and garbage collection causes better programming discipline
>needed for harder projects anyway.
Working without these features might be a good way to _learn_ better
programming discipline, but good discipline combined with helpful features
is better than either one on its own.
>Is C still the language of choice for serious programming?
Sometimes. Use the right tool for the job; sometimes C is the right
tool for the job, sometimes it isn't.
Keep in mind that technical advantages are never the only reason, and
often not the primary reason, why a particular tool is or isn't right
for a particular job. (But if they're ignored entirely that may be a
sign that something is wrong.)
>Which businesses favour C, e.g. game, driver, os, device or even web
>developement?
I write software for WeBuildRadar, and C is often the preferred language
for the parts of that software that I write (mostly data crunching of
various sorts).
The biggest reason for this is that additional features of "more advanced"
languages aren't necessary for the components of the system that I get
assigned to (mostly processing-intensive), and C is the language I'm most
familiar with and also the easiest to get other languages (often useful
in other parts of the system) to play nicely with. It's also nice to
have an easy "upgrade" path to C++ if additional C++ish features turn
out to be useful (it's not difficult to keep header files both C-clean
and C++-clean, and converting a well-written C module to correct C++
code ready for C++isms to be added can be done in an afternoon with time
to spare).
Another reason C is nice to work with for this type of application is its
"What you type is what you get" nature. This isn't always a Good Thing
(often you WANT the compiler to do things behind your back, because
you don't want to have to deal with them yourself), but in cases where
the type of things other languages do for you don't need to be done
anyways, not having to worry about things you don't want the language
doing without asking it to makes it easier (with enough experience)
to see bugs and inefficiencies when the first pass at the code doesn't
work correctly or quickly enough.
That having been said, I do end up switching to C++ (or starting with it)
often enough that being restricted to only C would make life difficult,
and I do have a few bits of C code that it would have been nice to have
converted to C++ BEFORE they started getting as messy and complicated
as they are now. So even though C is still useful, it's definitely not
the only language you need to know.
(And then there's the times when somebody else converts my code to C++
to make a change that would have been better done in C anyways... and
introduces a bug doing it... and then I have to find the bug without
any clues about whether it's a problem with the conversion or the new
code...)
So, short answer to your question: C is still useful (and widely used),
but not as universally as it was 20 years ago[1]; there are now more
general-purpose languages that are better for some things than C is,
and there are more special-purpose languages that are better than any
general-purpose language (including C) for the purpose they're built for.
dave
[1] It's worth noting that 20 years ago I was 5 years old and had never
seen a computer, so my knowledge of the state of the world then
is built solely on second- and third-hand knowledge, but I'd be
surprised if anybody who was around 20 years ago would disagree with
this assessment of the difference in the state of the world.
--
Dave Vandervies dj3vande@xxxxxxxxxxxxxxxxxxx
The best idea for you would be to learn the hype language of the second half
of this decade. That way, you would have a head start of at least two years.
--Kurt Watzka in comp.lang.c
.
- Follow-Ups:
- Re: The status of C
- From: Jean-Claude Arbaut
- Re: The status of C
- References:
- The status of C
- From: Martin Johansen
- The status of C
- Prev by Date: Re: cast to volatile
- Next by Date: Re: Arithmetic shift operation in C
- Previous by thread: Re: The status of C
- Next by thread: Re: The status of C
- Index(es):