No point in learning C? Use C++ instead?

L

-Lost

In a recent programming class I was taking, another student went on and
on about how C was a dead language. I tried my best to explain why this
was not so, but he was more able to explain things like C missing the
STL, vectors, linked lists and a ton of other stuff.

Having limited knowledge of C, I wasn't able to properly or adequately
discuss this with him. Although *I* think C is not dead, I realize it
lacks certain things that C++ does. But to me that is the point of *ALL*
programming languages... they each do something differently, and lack
something that some other language does.

Anyway, my question is this: Is C dead?

Just so that my intent for an answer is clear, should a new programmer
focus on C++ instead of C? If they were given the opportunity to attend
a *good* programming class for a whole year or so, which should they
choose?

Also, I didn't focus on desktop, network-related, graphics-specific, et
cetera questions, because I don't really care. C or C++. If you had to
answer based on just each one as a language... what would you recommend?

Also, I would have poured over the FAQ more, except it is currently down
(both links).
 
R

Richard Heathfield

-Lost said:
In a recent programming class I was taking, another student went on
and
on about how C was a dead language.

Let him remove all programs from his desktop system that are written in
C, and try to reboot. I think he'll find that it's his system that's
dead, rather than the C language.
I tried my best to explain why
this was not so, but he was more able to explain things like C missing
the STL, vectors, linked lists and a ton of other stuff.

It is true that C lacks the STL, vectors, linked lists, etc. And indeed
a ton of other stuff. What remains is a light, portable language which
is easy to learn, easy to use, and easy to port. Carbon lacks the
weight of uranium, and the project to build a carbon-based nuclear bomb
never really got off the ground - but we still build people out of
carbon. Bigger and more radioactive doesn't necessarily mean better.
Having limited knowledge of C, I wasn't able to properly or adequately
discuss this with him. Although *I* think C is not dead, I realize it
lacks certain things that C++ does. But to me that is the point of
*ALL* programming languages... they each do something differently, and
lack something that some other language does.

Or perhaps a different emphasis. C emphasises simplicity, portability,
and speed. C++ is far more concerned with abstraction.
Anyway, my question is this: Is C dead?
No.

Just so that my intent for an answer is clear, should a new programmer
focus on C++ instead of C?

That depends on what kind of programmer they are. Some people think
better in C++ than they do in C, and others think better in C than they
do in C++. To say that a new programmer *must* learn C++ is to lose the
benefit of having programmers around who would have been great C
programmers if only they hadn't been forced to learn C++ and couldn't
get into that mindset, and ended up either dropping out from
programming completely or being lousy C++ programmers.

If they were given the opportunity to
attend a *good* programming class for a whole year or so, which should
they choose?

A good programming class will emphasise the skill of programming, which
is broadly language-independent. It is true that each language has its
own features, merits, and flaws, and that a good programmer must be
able respectively to exploit, embrace, and work around these, but the
most important thing a programmer can learn is programming. The
language of choice will be different for each programmer.
Also, I didn't focus on desktop, network-related, graphics-specific,
et
cetera questions, because I don't really care. C or C++. If you had
to answer based on just each one as a language... what would you
recommend?

The question is unanswerable. The choice depends not on the languages
themselves but on the mindset of the programmer.

<snip>
 
R

Ravishankar S

-Lost said:
In a recent programming class I was taking, another student went on and
on about how C was a dead language. I tried my best to explain why this
was not so, but he was more able to explain things like C missing the
STL, vectors, linked lists and a ton of other stuff.

Having limited knowledge of C, I wasn't able to properly or adequately
discuss this with him. Although *I* think C is not dead, I realize it
lacks certain things that C++ does. But to me that is the point of *ALL*
programming languages... they each do something differently, and lack
something that some other language does.

Anyway, my question is this: Is C dead?

Just so that my intent for an answer is clear, should a new programmer
focus on C++ instead of C? If they were given the opportunity to attend
a *good* programming class for a whole year or so, which should they
choose?

Also, I didn't focus on desktop, network-related, graphics-specific, et
cetera questions, because I don't really care. C or C++. If you had to
answer based on just each one as a language... what would you recommend?

Also, I would have poured over the FAQ more, except it is currently down
(both links).

C is most widely used in embedded and real-time systems. C++ is not quite
there yet. The reason I suspect is because, in C , What you program is what
you Get : everything is predictable, no second guessing.

The feature (or one can say even the problem) of C++ is that its
multiparadigm. There are more than a dozen ways of implementing a stack or
queue. Which paradigm do you teach a beginner ?
 
J

James Dow Allen

should a new programmer
focus on C++ instead of C?

No one would encourage a Lisp programmer to
switch to APL, or vice versa. No one would
encourage a Cobol programmer to switch to
Prolog, or vice versa. These language
pairs are blatantly different, appealing
to different tastes, and appropriate for
different applications.

The fact that C and C++ have extremely similar
syntax blinds many people to the fact that
C and C++ also form a highly incompatible
language pair! C is the lowest-level of
standard languages and often called the
"portable assembly language" (a description
often disputed by people who don't understand
its context). C++ with its strong typing
("let the compiler figure out which functions
are appropriate to call") is the *highest*
level language in general use, and thus
at the opposite end of the spectrum from C.

Many silly discussions would disappear if C++
had instead been called LCDFCBSSS -
a "Language *completely* different from C
but sharing similar syntax."

James Dow Allen
 
E

Eric Sosman

-Lost said:
[...]
Just so that my intent for an answer is clear, should a new programmer
focus on C++ instead of C? [...]

A new programmer -- even an old, crusty, time-worn
programmer -- should focus on learning how to program.
A new programming language comes along every five minutes
or so; you can count on a new "widespread" language every
five years if not more frequently. If you want to be a
programmer, you *will* need to write programs in several
languages. If you remain in the profession for more than
a decade, you will find yourself writing in languages that
do not even exist today.

Tastes and learning methods differ, but I'd suggest that
a beginning programmer should learn at least one object-oriented
language (Java, Python, ...), at least one old-style procedural
language (C, C++, Fortran), at least two assembly languages
(for dissimilar machines), and Lisp. Others will surely suggest
different curricula, but I don't think you'll find any serious
programmer suggesting that Language L Has All The Answers.
 
S

Sheth Raxit

In a recent programming class I was taking, another student went on and
on about how C was a dead language. I tried my best to explain why this
was not so, but he was more able to explain things like C missing the
STL, vectors, linked lists and a ton of other stuff.

Having limited knowledge of C, I wasn't able to properly or adequately
discuss this with him. Although *I* think C is not dead, I realize it
lacks certain things that C++ does. But to me that is the point of *ALL*
programming languages... they each do something differently, and lack
something that some other language does.

Anyway, my question is this: Is C dead?
no, as many people using C currently to write OS/Kernel/Embedded Stuff/
and lot more things.
Just so that my intent for an answer is clear, should a new programmer
focus on C++ instead of C? If they were given the opportunity to attend

One should learn
1. Programming,
2. OOAD Concepts this will help him/her comfort with many languages.


Treat Programming Language as Tool, It is not practical to use C
everywhere , It is not wise to use C++/C#/Java everywhere. It is not
wise to use Hammer everywhere when there is need of screwdriver <or
simillar stuffs>

So even you learn any language in programming class, treat them as
tool.
a *good* programming class for a whole year or so, which should they
choose?

Also, I didn't focus on desktop, network-related, graphics-specific, et
cetera questions, because I don't really care. C or C++. If you had to
answer based on just each one as a language... what would you recommend?

Also, I would have poured over the FAQ more, except it is currently down
(both links).

-Raxit
 
J

Jack Klein

In a recent programming class I was taking, another student went on and
on about how C was a dead language. I tried my best to explain why this
was not so, but he was more able to explain things like C missing the
STL, vectors, linked lists and a ton of other stuff.

So? C is also missing DATA statements, computed GOTO, and "procedure
options main". I don't miss any of them.

Your "another student" is ignorant. That is not an insult, everyone
is ignorant about many, many things. But wiser people try to avoid
expressing strong, absolute opinions in their areas of ignorance.

In particular, he is ignorant about the real world of computers and
programming.

To the average person, computers are the desktops and laptops they
see, and perhaps the servers that run on their company's network and
the web sites that they visit. They run Windows, Linux, or MacOS. He
might even have heard of exotic things like "HPUX", "Solaris", and
"UNIX".

He doesn't have a clue.

For every one of those computers that has the capacity to run programs
in C++, there are hundreds to thousands of computers executing code.

Do you have a cell phone, an iPod or other MP3 player? A CD player in
your car, home, pocket? A GPS receiver? A cordless phone? A digital
clock? A digital watch? A calculator? A set-top box on your TV? A
television made in the past 20 years, for that matter?

There are literally tens of billions of computers in the world, and a
very great percentage of them execute programs written in C. The
operating system on the ARM processor in every cell phone in the world
is written mostly in C, and that includes Windows Mobile and Windows
CE, as well as Linux, Symbian, and PalmOS.

C is the most widely available, widely used, ad successful language in
the history of computing to date, and will remain so for a very long
time to come. There are C implementations for everything from the
smallest 8-bit microcontroller with a few dozen bytes of RAM to the
newest multiple core 64-bit CPUs and beyond.

In a very real sense, in terms of the actual programs being executed
every second of every minute of every hour of every day, computers run
code written in C. Everything else is down in the noise margin.

Now there is the fact that C is considered a dying language in the
world of IT and the Internet, where they never cease chasing the
forever elusive "silver bullet. The security holes it is possible to
write in C are old hat, they are busy inventing new and better hazards
in AJAX for Web 2.0.

But if every desktop, laptop, workstation, and server in the world
converted all its operating systems and applications to C++ or other
languages, and never executed a C program again, that would still
leave the other 98% of the computers in the world, largely running C.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
 
M

Mark McIntyre

In a recent programming class I was taking, another student went on and
on about how C was a dead language.

This is one of those unanswerably stupid remarks. Best ignore it.
I tried my best to explain why this
was not so, but he was more able to explain things like C missing the
STL, vectors, linked lists and a ton of other stuff.

Compared to a people carrier, a Ferrari is lacking a ton of stuff too,
like towbars, back seats, four-wheel drive, usable luggage space,
somewhere to keep your kids' snacks etc. Does that mean that Ferraris
are dead? Or perhaps differently purposed, driven by more skilled
drivers who are more dedicated to driving....
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
A

August Karlstrom

James Dow Allen skrev:
[...]
C++ with its strong typing
("let the compiler figure out which functions
are appropriate to call") is the *highest*
level language in general use, and thus
at the opposite end of the spectrum from C.

You are joking, right?


August
 
O

Old Wolf

C is most widely used in embedded and real-time systems. C++ is not quite
there yet. The reason I suspect is because, in C , What you program is what
you Get : everything is predictable, no second guessing.

It is like that in C++ as well. I suspect it is
not as widely used because it is much more difficult
to write a good compiler, so many companies don't bother.
The feature (or one can say even the problem) of C++ is that its
multiparadigm. There are more than a dozen ways of implementing
a stack or queue. Which paradigm do you teach a beginner ?

The one that takes one line, surely.
 
S

SM Ryan

# >In a recent programming class I was taking, another student went on and
# >on about how C was a dead language.

For your own projects, choose whatever language you want to.
For other peoples's projects, use whatever language they tell you to.
 
K

Keith Thompson

CBFalconer said:
Pierre said:
-Lost said:
In a recent programming class I was taking, another student went
on and on about how C was a dead language. [ ... ]

Have a look (both of you) at the C++ faq, this one in particular:
http://www.parashift.com/c++-faq-lite/big-picture.html#faq-6.5

If you examine the name of this newsgroup with extreme care, I
suspect you will detect the absence of "++" in its name. That is
another language.

Yes, but that particular section of the C++ FAQ happens to be relevant
to the question:
| Stop. This question generates much much more heat than light. Please
| read the following before posting some variant of this question.
[...]
 
L

-Lost

Having received such a large and healthy sampling from a lot of experienced
programmers, I figured it might be easiest to post a response as a whole,
as I have nothing specific to say to anyone aside from, "Thanks!"

The thread I refer to can be viewed in its entirety here:
Message-ID: <[email protected]>

Message-IDs precede my thanks to the authors.

Message-ID: <[email protected]>
Message-ID: <[email protected]>

To Mr. Heathfield and Mr. Klein, thank you *very* much for the detailed
amount of information you put into your posts. It was very clear and
informative.

Message-ID: <[email protected]>
Message-ID: <[email protected]>
Message-ID: <[email protected]>

To Ravishankar, Mr. Sosman, and Mr. McIntyre thank you for your real-world
analogies. They have helped me to understand the scenario a bit better.

Message-ID: <[email protected]>

To Mr. Asselin, thank you for providing that relevant link. Despite it
possibly being off-topic, I found it extremely beneficial.

To the regulars, if this was a wholly inappropriate method of responding,
please let me know and I'll note it for the future. I just thought it kind
of senseless to post 6 separate entries of gratitude, with the majority of
the text snipped, when I could condense it quite nicely with references to
all posts should anyone feel the need to follow along in the future.

Thanks again to everyone who replied. I truly appreciate it.
 
R

Richard Heathfield

-Lost said:

To the regulars, if this was a wholly inappropriate method of
responding,
please let me know and I'll note it for the future.

No, that was well done.
I just thought it
kind of senseless to post 6 separate entries of gratitude,

Indeed. One generic "ta" was much more sensible. Considerate posters are
always welcome in comp.lang.c.
 
C

Chris Hills

-Lost said:
In a recent programming class I was taking, another student went on and
on about how C was a dead language.

Anyway, my question is this: Is C dead?

Just so that my intent for an answer is clear, should a new programmer
focus on C++ instead of C? If they were given the opportunity to attend
a *good* programming class for a whole year or so, which should they
choose?

It depends.

For most real-tile, embedded , device driver, operating systems and
control systems work C is probably the best option commercially as it
is the most widely used.

If you want to work on a PC write applications etc then C++ is probably
a better option however C++ has been overtaken by Java, C#, C++/CLI
and a host of others.

There is a possibility that C++ will disappear long before C does.
 
C

Chris Hills

CBFalconer said:
Pierre said:
-Lost said:
In a recent programming class I was taking, another student went
on and on about how C was a dead language. [ ... ]

Have a look (both of you) at the C++ faq, this one in particular:
http://www.parashift.com/c++-faq-lite/big-picture.html#faq-6.5

If you examine the name of this newsgroup with extreme care, I
suspect you will detect the absence of "++" in its name. That is
another language.

Chuck F (cbfalconer at maineline dot net)
Thank god we are not all like you! If the original post was posted to
the C++ group they would not discuss it either because it mentions C!

If you look at the link to a C++ FAQ I expect it will mention C as well
as C++ Just as the C one should mention C++
 
R

Richard

Chris Hills said:
CBFalconer said:
Pierre said:
In a recent programming class I was taking, another student went
on and on about how C was a dead language. [ ... ]

Have a look (both of you) at the C++ faq, this one in particular:
http://www.parashift.com/c++-faq-lite/big-picture.html#faq-6.5

If you examine the name of this newsgroup with extreme care, I
suspect you will detect the absence of "++" in its name. That is
another language.

Did anyone ever tell you that you are an extremely irritating, boring
man? Did you not notice that he is asking about C too?
Thank god we are not all like you! If the original post was posted
to the C++ group they would not discuss it either because it mentions
C!

Well said.
 
C

CBFalconer

Chris said:
.... snip ...

It depends.

For most real-tile, embedded , device driver, operating systems
and control systems work C is probably the best option
commercially as it is the most widely used.

If you want to work on a PC write applications etc then C++ is
probably a better option however C++ has been overtaken by Java,
C#, C++/CLI and a host of others.

There is a possibility that C++ will disappear long before C does.

The millenium has arrived. We agree on something. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top