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

Discussion in 'C Programming' started by -Lost, Aug 14, 2007.

  1. -Lost

    -Lost Guest

    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.
     
    -Lost, Aug 14, 2007
    #1
    1. Advertising

  2. -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
     
    Richard Heathfield, Aug 14, 2007
    #2
    1. Advertising

  3. "-Lost" <> 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 ?
     
    Ravishankar S, Aug 14, 2007
    #3
  4. Re: No point in learning C? Use C++ instead?

    On Aug 13, 6:19 pm, "-Lost" <> 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
     
    James Dow Allen, Aug 14, 2007
    #4
  5. -Lost

    Eric Sosman Guest

    -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
    lid
     
    Eric Sosman, Aug 14, 2007
    #5
  6. -Lost

    Sheth Raxit Guest

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

    On Aug 14, 10:19 am, "-Lost" <> 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
     
    Sheth Raxit, Aug 14, 2007
    #6
  7. -Lost

    Jack Klein Guest

    On Tue, 14 Aug 2007 01:19:02 -0500, "-Lost"
    <> 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
     
    Jack Klein, Aug 14, 2007
    #7
  8. On Tue, 14 Aug 2007 01:19:02 -0500, in comp.lang.c , "-Lost"
    <> 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
     
    Mark McIntyre, Aug 14, 2007
    #8
  9. Re: No point in learning C? Use C++ instead?

    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
     
    August Karlstrom, Aug 14, 2007
    #9
  10. -Lost

    Old Wolf Guest

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

    On Aug 14, 8:04 pm, "Ravishankar S" <>
    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.
     
    Old Wolf, Aug 14, 2007
    #10
  11. -Lost

    SM Ryan Guest

    # >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.

    --
    SM Ryan http://www.rawbw.com/~wyrmwif/
    We found a loophole; they can't keep us out anymore.
     
    SM Ryan, Aug 15, 2007
    #11
  12. Pierre Asselin, Aug 15, 2007
    #12
  13. -Lost

    CBFalconer Guest

    Pierre Asselin wrote:
    > -Lost <> wrote:
    >
    >> 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)
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net>



    --
    Posted via a free Usenet account from http://www.teranews.com
     
    CBFalconer, Aug 15, 2007
    #13
  14. CBFalconer <> writes:
    > Pierre Asselin wrote:
    >> -Lost <> wrote:
    >>
    >>> 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.
    [...]

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, Aug 15, 2007
    #14
  15. -Lost

    -Lost Guest

    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: <Xns998C17F763D44lostthreads@216.196.97.136>

    Message-IDs precede my thanks to the authors.

    Message-ID: <>
    Message-ID: <>

    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: <f9rnmh$dj2$>
    Message-ID: <>
    Message-ID: <>

    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: <f9tkq5$1nn$>

    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.

    --
    -Lost
    Remove the extra words to reply by e-mail. Don't e-mail me. I am kidding.
    No I am not.
     
    -Lost, Aug 15, 2007
    #15
  16. -Lost said:

    <snip>

    > 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.

    --
    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
     
    Richard Heathfield, Aug 15, 2007
    #16
  17. -Lost

    Chris Hills Guest

    In article <Xns998C17F763D44lostthreads@216.196.97.136>, -Lost
    <> writes
    >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.

    --
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
    /\/\/ www.phaedsys.org \/\/\
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
     
    Chris Hills, Aug 15, 2007
    #17
  18. -Lost

    Chris Hills Guest

    In article <>, CBFalconer
    <> writes
    >Pierre Asselin wrote:
    >> -Lost <> wrote:
    >>
    >>> 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++


    --
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
    /\/\/ www.phaedsys.org \/\/\
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
     
    Chris Hills, Aug 15, 2007
    #18
  19. -Lost

    Richard Guest

    Chris Hills <> writes:

    > In article <>, CBFalconer
    > <> writes
    >>Pierre Asselin wrote:
    >>> -Lost <> wrote:
    >>>
    >>>> 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?

    >>
    >> 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!


    Well said.

    >
    > 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++
     
    Richard, Aug 15, 2007
    #19
  20. -Lost

    CBFalconer Guest

    Chris Hills wrote:
    > -Lost <> writes
    >

    .... snip ...
    >>
    >> 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.


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

    --
    Chuck F (cbfalconer at maineline dot net)
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net>



    --
    Posted via a free Usenet account from http://www.teranews.com
     
    CBFalconer, Aug 15, 2007
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hal Vaughan
    Replies:
    7
    Views:
    532
  2. Replies:
    0
    Views:
    273
  3. Tony Johansson
    Replies:
    1
    Views:
    671
    Brian Cryer
    Nov 30, 2010
  4. Saraswati lakki
    Replies:
    0
    Views:
    1,426
    Saraswati lakki
    Jan 6, 2012
  5. Andrey Popp

    [I'm learning C]: Learning to use ucontext

    Andrey Popp, Jan 29, 2012, in forum: C Programming
    Replies:
    5
    Views:
    808
    Keith Thompson
    Jan 31, 2012
Loading...

Share This Page