Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > No point in learning C? Use C++ instead?

Reply
Thread Tools

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

 
 
-Lost
Guest
Posts: n/a
 
      08-14-2007
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).

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
 
Reply With Quote
 
 
 
 
Richard Heathfield
Guest
Posts: n/a
 
      08-14-2007
-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>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
 
 
 
Ravishankar S
Guest
Posts: n/a
 
      08-14-2007

"-Lost" <(E-Mail Removed)> wrote in message
news:Xns998C17F763D44lostthreads@216.196.97.136...
> 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 ?



 
Reply With Quote
 
James Dow Allen
Guest
Posts: n/a
 
      08-14-2007
On Aug 13, 6:19 pm, "-Lost" <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
Eric Sosman
Guest
Posts: n/a
 
      08-14-2007
-Lost wrote:
> [...]
> 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.

--
Eric Sosman
http://www.velocityreviews.com/forums/(E-Mail Removed)lid
 
Reply With Quote
 
Sheth Raxit
Guest
Posts: n/a
 
      08-14-2007
On Aug 14, 10:19 am, "-Lost" <(E-Mail Removed)> wrote:
> 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).
>
> --
> -Lost
> Remove the extra words to reply by e-mail. Don't e-mail me. I am
> kidding. No I am not.


-Raxit

 
Reply With Quote
 
Jack Klein
Guest
Posts: n/a
 
      08-14-2007
On Tue, 14 Aug 2007 01:19:02 -0500, "-Lost"
<(E-Mail Removed)> wrote in comp.lang.c:

> 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
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      08-14-2007
On Tue, 14 Aug 2007 01:19:02 -0500, in comp.lang.c , "-Lost"
<(E-Mail Removed)> wrote:

>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
 
Reply With Quote
 
August Karlstrom
Guest
Posts: n/a
 
      08-14-2007
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
 
Reply With Quote
 
Old Wolf
Guest
Posts: n/a
 
      08-14-2007
On Aug 14, 8:04 pm, "Ravishankar S" <(E-Mail Removed)>
wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[I'm learning C]: Learning to use ucontext Andrey Popp C Programming 5 01-31-2012 01:05 AM
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
Scenario 5: IS-IS routing on Frame Relay Multi-point and Point-to-Point David Sudjiman Cisco 0 06-08-2006 09:11 AM
Learning C and Learning Make/Configure/Building/Linking Hal Vaughan C Programming 7 03-21-2006 05:07 PM
e-learning, (collaborative learning environment) collinm Java 1 09-08-2005 09:52 PM



Advertisments