The Future of C++ ?

Discussion in 'C++' started by blangela, Nov 18, 2006.

  1. blangela

    blangela Guest

    If you had asked me 5 years ago about the future of C++, I would have
    told you that its future was assured for many years to come. Recently,
    I have been starting to wonder.

    I have been teaching C++ at a local polytechnical school here in
    Vancouver, Canada for approximately 8 years. Six years ago, at the
    height (or should I say volume?) of the internet bubble, I had 80+
    students per semester in my C++ course. Now I am fortunate to have 15
    students per semester. What has changed? I believe that students are
    no longer interested in learning C++. They would rather learn .NET
    languages or Java (my colleages who teach these courses seem to be very
    busy!). I believe it is because these other languages are easier to
    learn and/or are perceived to be more relevant today.

    I do believe that C++ is more difficult to learn than many of these
    other languages. Despite my best efforts to make them exciting, I see
    the eyes of my students start to glaze over when I start explaining
    pointers. When I ask them to tokenize an english sentence (using the
    strtok() function) and print the token in reverse order (they need to
    declare an array of type char * and save the addresses of the tokens in
    this array), I experience near panic from many of my students. But
    these concepts need to be taught in a responsible C++ course. As was
    pointed out to me recently, Microsoft still requires applicants to
    demonstrate a very good knowledge of string manipulation using C-style
    strings (none of these fancy string class objects!) when recruiting C++
    programmers.

    The ironic part is there is still a large demand for C++ developers
    here in Vancouver. In fact, the company that I believe employs the
    most developers here in Vancouver, employs almost entirely C++
    programmers. This company, Electronic Arts (if you have not heard of
    them, I guarantee that your kids have -- they create video games) is
    only one of several gaming companies here in Vancouver that employ
    primarily C++ programmers. Other companies like Kodak, MDSA, Nokia,
    MDSI, etc. also employ large numbers of C++ programmers. Not
    surprisingly, I have talked to several companies here in Vancouver who
    are complaining that they are having difficulty finding C++ developers
    and are looking at trying to recruit from abroad (eastern Europe
    primarily).

    I believe that many of these companies will be forced to migrate away
    from C++ in the near future, simply because they will not be able to
    find C++ programmers in the future. Soon the baby boomer C++
    programmers will begin to retire, then the proverbial @@@@ will really
    start to hit the fan!

    Please tell me I am wrong, and paint me a view of the future which
    includes C++.
     
    blangela, Nov 18, 2006
    #1
    1. Advertising

  2. * blangela:
    > If you had asked me 5 years ago about the future of C++, I would have
    > told you that its future was assured for many years to come. Recently,
    > I have been starting to wonder.
    >
    > I have been teaching C++ at a local polytechnical school here in
    > Vancouver, Canada for approximately 8 years. Six years ago, at the
    > height (or should I say volume?) of the internet bubble, I had 80+
    > students per semester in my C++ course. Now I am fortunate to have 15
    > students per semester. What has changed? I believe that students are
    > no longer interested in learning C++. They would rather learn .NET
    > languages or Java (my colleages who teach these courses seem to be very
    > busy!). I believe it is because these other languages are easier to
    > learn and/or are perceived to be more relevant today.
    >
    > I do believe that C++ is more difficult to learn than many of these
    > other languages. Despite my best efforts to make them exciting, I see
    > the eyes of my students start to glaze over when I start explaining
    > pointers. When I ask them to tokenize an english sentence (using the
    > strtok() function)


    There you have it: you're teaching the hard C parts first. Am I right
    that these students who're choosing between Java, C# and C++ have no
    programming background? I then think learning C# (or even JavaScript!)
    first is a good idea wrt. learning programming, and learning Java a good
    idea wrt. learning something helpful in getting a job without learning
    more first.


    > and print the token in reverse order (they need to
    > declare an array of type char * and save the addresses of the tokens in
    > this array), I experience near panic from many of my students. But
    > these concepts need to be taught in a responsible C++ course. As was
    > pointed out to me recently, Microsoft still requires applicants to
    > demonstrate a very good knowledge of string manipulation using C-style
    > strings (none of these fancy string class objects!) when recruiting C++
    > programmers.


    Again, teach 'em use of standard library classes first. std::string
    isn't fancy. Show that C++ can be a productive language at that level.

    After learning "high level" C++, teach them in a separate course about
    the C subset.

    Course e.g. entitled "The C subset of C++: pointers & other hairy
    stuff", where for example you can go into why two-phase initialization
    isn't a very bright idea in general, but why it's necessary on some
    limited platforms such as Symbian C++ (lacking C++ exceptions).

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Alf P. Steinbach, Nov 18, 2006
    #2
    1. Advertising

  3. blangela

    Phlip Guest

    blangela wrote:

    > Please tell me I am wrong, and paint me a view of the future which
    > includes C++.


    Modern C++ is a very powerful language, and the existing literature and
    corpus of example software lags far behind its capacities.

    Java and .NET thrive due to "management by magazine". Because the price of
    C++ is a high risk of bugs, marketects can advertise Java (and its direct
    clone) as "safer and more robust".

    Programmers who actually learn C++ are directly competitive with the VM
    languages. Those languages typically _reduce_ their available features, to
    make code appear easier to make right. This generally causes you to write
    more cruft in those languages.

    A C++ programmer will deliberately but _voluntarily_ reduce their set of
    working techniques, till they are using ones with matching robustness.

    (Note, Java-philes, I did _not_ say smart pointers are the equivalent of
    Java references. Each has different robustness profiles.)

    The distinction is C++ programmers have the _option_ to get closer to the
    metal, when they need it.

    Contrarily, the majority of programming these days is high-level; trivially
    gluing applications together from large-scale components, such as GUIs and
    databases. The GUIs and databases themselves should be slowly written once,
    in C++. The high-level code should be rapidly written in a safer and more
    flexible scripting language.

    There may not always be a world for average C++ coders, but there will
    always be a world for the C++ code itself.

    --
    Phlip
    http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
     
    Phlip, Nov 18, 2006
    #3
  4. blangela

    shabbir Guest

    I would frame it that way that people are running behind short term
    gain.

    I am a C++ programmer myself and havent had any training or havent read
    any book of C# but I am doing job in C# for 8-9 months now without
    facing any real problem and thats because I was good at C++.

    When they run for one technology they become lame in a sense that its
    temporary and C++ is more or less the base and so its permanent.

    As we see now C# has descendant like F# and so you cannot be learning
    each of them but if you have the base you can opt for anything anytime
    and so still I think C++ is the future.

    Thanks
    Shabbir
    --
    www.cfanatic.com - Community discussing C and its derivatives like
    Win32, C++, MFC, C# tutorials

    On Nov 18, 10:25 am, "blangela" <> wrote:
    > If you had asked me 5 years ago about the future of C++, I would have
    > told you that its future was assured for many years to come. Recently,
    > I have been starting to wonder.
    >
    > I have been teaching C++ at a local polytechnical school here in
    > Vancouver, Canada for approximately 8 years. Six years ago, at the
    > height (or should I say volume?) of the internet bubble, I had 80+
    > students per semester in my C++ course. Now I am fortunate to have 15
    > students per semester. What has changed? I believe that students are
    > no longer interested in learning C++. They would rather learn .NET
    > languages or Java (my colleages who teach these courses seem to be very
    > busy!). I believe it is because these other languages are easier to
    > learn and/or are perceived to be more relevant today.
    >
    > I do believe that C++ is more difficult to learn than many of these
    > other languages. Despite my best efforts to make them exciting, I see
    > the eyes of my students start to glaze over when I start explaining
    > pointers. When I ask them to tokenize an english sentence (using the
    > strtok() function) and print the token in reverse order (they need to
    > declare an array of type char * and save the addresses of the tokens in
    > this array), I experience near panic from many of my students. But
    > these concepts need to be taught in a responsible C++ course. As was
    > pointed out to me recently, Microsoft still requires applicants to
    > demonstrate a very good knowledge of string manipulation using C-style
    > strings (none of these fancy string class objects!) when recruiting C++
    > programmers.
    >
    > The ironic part is there is still a large demand for C++ developers
    > here in Vancouver. In fact, the company that I believe employs the
    > most developers here in Vancouver, employs almost entirely C++
    > programmers. This company, Electronic Arts (if you have not heard of
    > them, I guarantee that your kids have -- they create video games) is
    > only one of several gaming companies here in Vancouver that employ
    > primarily C++ programmers. Other companies like Kodak, MDSA, Nokia,
    > MDSI, etc. also employ large numbers of C++ programmers. Not
    > surprisingly, I have talked to several companies here in Vancouver who
    > are complaining that they are having difficulty finding C++ developers
    > and are looking at trying to recruit from abroad (eastern Europe
    > primarily).
    >
    > I believe that many of these companies will be forced to migrate away
    > from C++ in the near future, simply because they will not be able to
    > find C++ programmers in the future. Soon the baby boomer C++
    > programmers will begin to retire, then the proverbial @@@@ will really
    > start to hit the fan!
    >
    > Please tell me I am wrong, and paint me a view of the future which
    > includes C++.
     
    shabbir, Nov 18, 2006
    #4
  5. [...]

    > (Note, Java-philes, I did _not_ say smart pointers are the equivalent of
    > Java references. Each has different robustness profiles.)


    Java references (e.g., strong thread-safe reference counting) in C++? No
    problem:

    http://appcore.home.comcast.net/vzoom/refcount/


    This can be used as an alternative to Boost shared_ptr, which is only basic
    thread-safe....


    Any thoughts?
     
    Chris Thomasson, Nov 18, 2006
    #5
  6. blangela

    loufoque Guest

    loufoque, Nov 18, 2006
    #6
  7. blangela

    loufoque Guest

    blangela wrote:

    > When I ask them to tokenize an english sentence (using the
    > strtok() function) and print the token in reverse order (they need to
    > declare an array of type char * and save the addresses of the tokens in
    > this array), I experience near panic from many of my students.


    Maybe students just don't come because they think your course is bad.
    They want to learn C++, not C.



    > As was
    > pointed out to me recently, Microsoft still requires applicants to
    > demonstrate a very good knowledge of string manipulation using C-style
    > strings (none of these fancy string class objects!) when recruiting C++
    > programmers.


    Thankfully, Microsoft is not the only company where you can do programming.
    Plus Microsoft isn't really doing C++ anyway, more like C with classes.
     
    loufoque, Nov 18, 2006
    #7
  8. On 17 Nov 2006 21:25:35 -0800, Bob_Langelaan wrote:
    >I have been teaching C++ at a local polytechnical school here in
    >Vancouver, Canada for approximately 8 years. Six years ago, at the
    >height (or should I say volume?) of the internet bubble, I had 80+
    >students per semester in my C++ course. Now I am fortunate to have 15
    >students per semester. What has changed? I believe that students are
    >no longer interested in learning C++.
    >
    >I do believe that C++ is more difficult to learn than many of these
    >other languages.


    IMO, that's the main reason. C++ is unnecessarily and unproductively,
    sometimes even ridiculously complex (see e.g.
    http://www.bookpool.com/ct/98031). There has been no effort in the
    last 10 or so years to make it easier and more accessible. Quite the
    contrary, an influential group of people even tries to 'boost' C++ by
    continuously introducing yet another level of complexity.

    >Despite my best efforts to make them exciting, I see
    >the eyes of my students start to glaze over when I start explaining
    >pointers.
    >But
    >these concepts need to be taught in a responsible C++ course. As was
    >pointed out to me recently, Microsoft still requires applicants to
    >demonstrate a very good knowledge of string manipulation using C-style
    >strings (none of these fancy string class objects!) when recruiting C++
    >programmers.


    C++ is a highly fragmented language. When C++ is discussed one must
    always ask: Which C++? Visual C++ (MFC), Embedded C++, Qt C++, C with
    classes (the most popular C++), Boost C++, Addison Wesley C++, Game
    Programmer C++, ...? This confusing fragmentation is sometimes
    reinterpreted as advantage and C++ is touted as 'multiparadigm'
    language.

    >The ironic part is there is still a large demand for C++ developers
    >here in Vancouver. I have talked to several companies here in Vancouver who
    >are complaining that they are having difficulty finding C++ developers
    >and are looking at trying to recruit from abroad (eastern Europe
    >primarily).


    There is still demand for C++ developers but currently there is higher
    demand for developers in other languages, esp. Java (until the bubble
    bursts again).

    >I believe that many of these companies will be forced to migrate away
    >from C++ in the near future, simply because they will not be able to
    >find C++ programmers in the future. Soon the baby boomer C++
    >programmers will begin to retire, then the proverbial @@@@ will really
    >start to hit the fan!


    AFAIK, you can program games today in any language, preferably C#.

    The real solution would be C++2, a new version of the C++ language
    (not an extension of the current language). I should avoid the
    numerous traps, pitfalls and wrong defaults of the current language.
    C++2 could be compatible with (but not a superset of) current C and
    C++ (through a compatibility mode). Of course, that's a futile
    proposal. That kind of language evolution happens in Python, Ruby,
    PHP, ... but not in C++.

    Best regards,
    Roland Pibinger
     
    Roland Pibinger, Nov 18, 2006
    #8
  9. "loufoque" <> wrote in message
    news:455edb8e$0$5411$...
    > Chris Thomasson wrote:
    >
    >> Java references (e.g., strong thread-safe reference counting) in C++? No
    >> problem:
    >>
    >> http://appcore.home.comcast.net/vzoom/refcount/

    >
    > Refcounting is not the same as a GC.


    You can get very similar guarantees' wrt strong atomic thread-safety
    level... And, as you know, one can always get around cyclic references via.
    clean/coherent synchronization scheme, or custom and/or "built-into-details"
    weak pointer logic...

    http://groups.google.com/group/comp.programming.threads/browse_frm/thread/f2c94118046142e8
    (more on true atomic refcounting... interesting thread indeed... ?)



    I would argue that a coupling of clean synchronization interface in which
    cyclic references are rare, with some lightweight weak-pointer scheme would
    give you strong guarantees' of Java references, in C++, but at a
    lower-level... You have more control over the atomic operations and memory
    barrier operations, and you don't need to tie yourself to a VM "system"
    API...

    Humm...
     
    Chris Thomasson, Nov 18, 2006
    #9
  10. blangela

    loufoque Guest

    Roland Pibinger wrote:

    > C++ is a highly fragmented language. When C++ is discussed one must
    > always ask: Which C++? Visual C++ (MFC), Embedded C++, Qt C++, C with
    > classes (the most popular C++), Boost C++, Addison Wesley C++, Game
    > Programmer C++, ...? This confusing fragmentation is sometimes
    > reinterpreted as advantage and C++ is touted as 'multiparadigm'
    > language.


    Looks like you didn't get it at all. They're just frameworks. Libraries.
    It's the same C++ but the libraries are designed differently and use
    different language features.

    Java, for example, also has multiple frameworks, even for one unique
    thing (GUI, game development...)

    The multiparadigm aspect isn't related to that at all. C++ is said to be
    multiparadigm because it has supports for various kinds of programming
    paradigms : imperative, object-oriented, generic, and possibly more.


    > AFAIK, you can program games today in any language, preferably C#.


    Games is one of the key domains that really need an efficient language
    like C++...


    > The real solution would be C++2, a new version of the C++ language
    > (not an extension of the current language). I should avoid the
    > numerous traps, pitfalls and wrong defaults of the current language.


    > C++2 could be compatible with (but not a superset of) current C and
    > C++ (through a compatibility mode).


    The main traps and pitfalls in C++ are from its compatibility with C.
     
    loufoque, Nov 18, 2006
    #10
  11. blangela

    Phlip Guest

    loufoque wrote:

    > Refcounting is not the same as a GC.


    In terms of language advocacy, C++ gives you the tools to build whatever
    quasi-GC system you want (including a true GC). It doesn't bend you over and
    stuff the One True Garbage Collector up your butt.

    --
    Phlip
    http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
     
    Phlip, Nov 18, 2006
    #11
  12. blangela

    Guest

    On Nov 18, 7:25 am, "blangela" <> wrote:
    > If you had asked me 5 years ago about the future of C++, I would have
    > told you that its future was assured for many years to come. Recently,
    > I have been starting to wonder.
    > .. snip ..
    > Please tell me I am wrong, and paint me a view of the future which
    > includes C++.


    Imho .NET will finally fall, as the open-source will knock it down, but
    ..NET is making it's final breaths... You just need to wait
     
    , Nov 18, 2006
    #12
  13. blangela:

    > What has changed? I believe that students are
    > no longer interested in learning C++. They would rather learn .NET
    > languages or Java (my colleages who teach these courses seem to be very
    > busy!). I believe it is because these other languages are easier to
    > learn and/or are perceived to be more relevant today.



    I think that a prerequisite to being a decent programmer is to have above
    average intelligence. A minority of people have above average intelligence,
    and so a minorty of people aspire to be an actual bonafide programmer
    programming in languages such as C and C++.

    For the less bright among us, there's Java.


    > Electronic Arts (if you have not heard of
    > them, I guarantee that your kids have -- they create video games) is
    > only one of several gaming companies here in Vancouver that employ
    > primarily C++ programmers.



    Computer games should be fast, and C++ can give performance.


    > Not
    > surprisingly, I have talked to several companies here in Vancouver who
    > are complaining that they are having difficulty finding C++ developers
    > and are looking at trying to recruit from abroad (eastern Europe
    > primarily).



    We've the same situation with medical doctors here in Ireland.

    --

    Frederick Gotham
     
    Frederick Gotham, Nov 18, 2006
    #13
  14. blangela

    blangela Guest

    I see a fair amount of responses to my initial post, but very few
    people willing to go out on a limb and predict the future of C++.
    Perhaps we will just have to wait and see.

    In response to those people who were critical of my C++ course (the
    post was not meant to get opinions on my course) I will mention the
    following facts:

    - I use as my primary text "C++ - How To Program" 5th edition by
    Deitel & Deitel which is by far the most popular college C++ text in
    the world! My favorite C++ text is actually "C++ Primer" 4th edition
    by Lippman and company, but it is difficult to use as an introductory
    C++ text - I do reference several sections from the text in my courses.

    - Students are supposed to have taken the Java BlueJ courses (2 - 12
    week courses, 3 hours/week including labs) as a prerequisite to my C++
    courses. Thus I can expect that they already have experience with OOP.

    - Classes are introduced in the first lecture of my course. So also
    is the string class. I do not introduce pointers until the 8th
    lecture. I suspect the text does so at that point so we can start
    working with dynamically created objects (using the new and delete
    operators). I could show how to assign a dynamically created object to
    a reference rather than to a pointer, but this might lead students to
    think this is the norm, which in my experience is not the case (I
    wonder why it is not done more often?).

    Cheers,

    Bob
     
    blangela, Nov 18, 2006
    #14
  15. blangela wrote:

    > If you had asked me 5 years ago about the future of C++,
    > I would have told you that its future was assured for many years to come.
    > Recently, I have been starting to wonder.
    > [snip]
    > Please tell me I am wrong
    > and paint me a view of the future which includes C++.


    The design of Java, C# and other such languages
    sacrifice performance and efficiency for simplicity and convenience.
    C++ is a larger and more difficult language because Bjarne Stroustrup
    refused to compromise performance and efficiency --
    he was targeting C programmers.

    The Java designers realized that most applications didn't require
    the performance and efficiency offered by C (and C++) and very carefully
    calculated the trade-offs for simplicity and convenience.
    The success of Java (and C#) have vindicated these trade-offs.

    The future of C++ appears to be secure
    where performance and efficiency count.
    According to Bjarne Stroustrup, there are no viable competitors yet.

    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    E. Robert Tisdale, Nov 18, 2006
    #15
  16. blangela

    blangela Guest

    E. Robert Tisdale wrote:
    ..
    ..
    ..
    > The future of C++ appears to be secure
    > where performance and efficiency count.
    > According to Bjarne Stroustrup, there are no viable competitors yet.
    >


    But can there be C++ without C++ programmers?
     
    blangela, Nov 18, 2006
    #16
  17. blangela wrote:
    ....
    >
    > Please tell me I am wrong, and paint me a view of the future which
    > includes C++.


    C++ is a very large language with many many uses. It will persist for a
    considerable time.

    The biggest advantage for Java is that they have many useful
    standardized libraries as part of the standard distribution. C++ has a
    plethora of non standard libraries that do vastly more than Java but it
    takes a significant amount of knowledge to navigate.

    Boost has been an attempt to consolidate the C++ world and there are others.

    The nice thing about some of the stuff I have seen is that the number of
    amazing libraries I see showing up in C++ land are significantly better
    than the Java or .NET systems and are probably more "robust" than Java
    or .NET.

    I have also met a number of Java coders who have migrated over to C++
    because they're frustrated with Java.

    If I was teaching C++ today, I would avoid C-isms in the "101" course
    and only introduce the ones that "helped".

    I would have a wrapper over main ...


    int main( const std::vector< std::string > & args )
    {
    std::cout << "Hello world\n";
    return 0;
    }
     
    Gianni Mariani, Nov 18, 2006
    #17
  18. blangela

    Bo Persson Guest

    blangela wrote:
    > E. Robert Tisdale wrote:
    > .
    > .
    > .
    >> The future of C++ appears to be secure
    >> where performance and efficiency count.
    >> According to Bjarne Stroustrup, there are no viable competitors
    >> yet.
    >>

    >
    > But can there be C++ without C++ programmers?


    No, but there is a lot off difference between "go away" and not being the
    most popular language at the moment.

    Both Java and .NET have large companies behind them, using millions and
    millions for promotion. Of course they are popular, "the best thing since
    sliced bread".

    Bjarne can never compete with that. Even though he is right!


    Bo Persson
     
    Bo Persson, Nov 18, 2006
    #18
  19. blangela

    Steve Pope Guest

    Roland Pibinger <> wrote:

    >IMO, that's the main reason. C++ is unnecessarily and unproductively,
    >sometimes even ridiculously complex (see e.g.
    >http://www.bookpool.com/ct/98031). There has been no effort in the
    >last 10 or so years to make it easier and more accessible. Quite the
    >contrary, an influential group of people even tries to 'boost' C++ by
    >continuously introducing yet another level of complexity.


    I don't think that C++ is too large and complex, yet, but
    I do see possibly too much feature-creep via the standards process.
    Standards activities tend to become spoiled by their own
    success. Not to say that those involved aren't doing a
    superb job, but standards work is very difficult (much more
    difficult than development).

    I have known of software managers to move away from C++
    due to a concern it is getting too large and uncontrollable.

    A better approach, I think, would be to use C++ but impose
    some discipline as to what libraries are used (and perhaps even,
    what (non-library) language features are routinely used, but
    there I think the concern is smaller).

    Steve
     
    Steve Pope, Nov 18, 2006
    #19
  20. blangela

    Phlip Guest

    Steve Pope wrote:

    > I don't think that C++ is too large and complex, yet, but
    > I do see possibly too much feature-creep via the standards process.


    Oh, totally, a new version once per decade is just blowing us all down.

    --
    Phlip
    http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
     
    Phlip, Nov 19, 2006
    #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. Midnight Java Junkie

    future of high-speed cable modems?

    Midnight Java Junkie, Jun 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    456
    Midnight Java Junkie
    Jun 20, 2004
  2. Elias Politakis

    Is ASP.NET the future of web applications

    Elias Politakis, Dec 1, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,330
    Cowboy \(Gregory A. Beamer\)
    Dec 1, 2003
  3. Elias Politakis

    Is ASP.NET the future of web applications

    Elias Politakis, Dec 1, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    458
  4. =?Utf-8?B?QW5kcmV3?=

    Future of ASP

    =?Utf-8?B?QW5kcmV3?=, Apr 29, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    406
  5. James P.
    Replies:
    7
    Views:
    12,524
    phamtasmic
    Jul 13, 2004
Loading...

Share This Page