Use cases for C++

Discussion in 'C++' started by Achim Schneider, Oct 19, 2008.

  1. I recently (6 months ago, that is) started to learn C++ because it's
    needed in a significant number of job ads, now find my way around but
    utterly lack routine. Besides doing boring exercises like "implement
    that and that data structure clean and efficient", I feel that what I
    really need to do is some sort of full-fledged (however small) program,
    not something abstract. I do know C quite in-depth, though.

    However, I can't think of a thing to do where I wouldn't choose Haskell
    or Scheme before even considering C++, which may very well be because
    my greater expertise in the former ones makes me blind for C++'s
    strengths.

    So, here's my question: What kind of program/project is C++'s home
    turf, where you just can't get around using it on a big scale (that
    is, excluding library interfaces and small amounts of generated code)?


    PS: No, I'm not trying to start a flame war. I really don't know.

    --
    (c) this sig last receiving data processing entity. Inspect headers
    for copyright history. All rights reserved. Copying, hiring, renting,
    performance and/or quoting of this signature prohibited.
    Achim Schneider, Oct 19, 2008
    #1
    1. Advertising

  2. On 2008-10-19 20:05, Achim Schneider wrote:
    > I recently (6 months ago, that is) started to learn C++ because it's
    > needed in a significant number of job ads, now find my way around but
    > utterly lack routine. Besides doing boring exercises like "implement
    > that and that data structure clean and efficient", I feel that what I
    > really need to do is some sort of full-fledged (however small) program,
    > not something abstract. I do know C quite in-depth, though.
    >
    > However, I can't think of a thing to do where I wouldn't choose Haskell
    > or Scheme before even considering C++, which may very well be because
    > my greater expertise in the former ones makes me blind for C++'s
    > strengths.
    >
    > So, here's my question: What kind of program/project is C++'s home
    > turf, where you just can't get around using it on a big scale (that
    > is, excluding library interfaces and small amounts of generated code)?


    C++ can be used for just about anything you can think of, but the place
    where you more or less have to use C++ (or C, or perhaps Ada) is system
    programming or when targeting more "exotic" platforms where the runtimes
    needed by more flashy languages do not exist. Or embedded systems where
    resources are scarce, or when performance is required (most games are
    written in C or C++).

    --
    Erik Wikström
    Erik Wikström, Oct 19, 2008
    #2
    1. Advertising

  3. Achim Schneider wrote:

    > So, here's my question: What kind of program/project is C++'s home
    > turf, where you just can't get around using it on a big scale (that
    > is, excluding library interfaces and small amounts of generated code)?


    The one you want to burn most money on. C++ must be the least productive
    language I've ever had the displeasure to come across.
    On a different note, it's more or less the only choice for portable GUI
    applications, because of wxWidgets and Qt, as long as you don't want to
    use Java, that is.
    If you know Scheme or Haskell well, you will weep.
    Matthias Buelow, Oct 19, 2008
    #3
  4. Achim Schneider wrote:
    > However, I can't think of a thing to do where I wouldn't choose Haskell
    > or Scheme before even considering C++, which may very well be because
    > my greater expertise in the former ones makes me blind for C++'s
    > strengths.


    One strentgh C++ has over many other languages is that it allows you
    to write programs which handle enormous amounts of data, applying
    complicated heavy algorithms to them, as efficiently as possible,
    consuming as little memory as possible, while still maintaining a fair
    level of abstraction and high-quality design in your code.

    I may be a bit biased in this subject because I have worked for years
    in projects where speed and memory usage were absolute imperatives
    (basically the more memory-efficient the program, the larger inputs it
    could handle in the same computer, and thus the better). While C++ is
    not the perfect language in all possible regards, I have found it to be
    excellent for these types of applications.

    For some reason the vast majority of programmers don't seem to be the
    least concerned about the memory usage of their programs. Sure, most
    programs simply don't need to worry about memory usage because they
    simply don't handle that much data, and current computers have plenty of
    memory. However, when you have to handle humongous amounts of data, then
    memory usage optimization steps in big time. And of course if your
    program can run the algorithm in 5 minutes rather than 5 hours, all the
    better.

    The great thing about C++ is that you usually are able to implement
    these optimizations while keeping a high level of abstraction and
    reusability.
    Juha Nieminen, Oct 20, 2008
    #4
  5. Matthias Buelow wrote:
    > C++ must be the least productive
    > language I've ever had the displeasure to come across.


    Then you clearly haven't tried C.

    (And don't believe *anything* C hackers will tell you. They are
    delusional.)
    Juha Nieminen, Oct 20, 2008
    #5
  6. Juha Nieminen wrote:

    >> C++ must be the least productive
    >> language I've ever had the displeasure to come across.

    >
    > Then you clearly haven't tried C.


    I don't think you'd like my answer. :)
    Matthias Buelow, Oct 20, 2008
    #6
  7. Achim Schneider

    Bo Persson Guest

    Achim Schneider wrote:
    > I recently (6 months ago, that is) started to learn C++ because it's
    > needed in a significant number of job ads, now find my way around
    > but utterly lack routine. Besides doing boring exercises like
    > "implement that and that data structure clean and efficient", I
    > feel that what I really need to do is some sort of full-fledged
    > (however small) program, not something abstract. I do know C quite
    > in-depth, though.
    >
    > However, I can't think of a thing to do where I wouldn't choose
    > Haskell or Scheme before even considering C++, which may very well
    > be because my greater expertise in the former ones makes me blind
    > for C++'s strengths.
    >
    > So, here's my question: What kind of program/project is C++'s home
    > turf, where you just can't get around using it on a big scale (that
    > is, excluding library interfaces and small amounts of generated
    > code)?
    >
    >
    > PS: No, I'm not trying to start a flame war. I really don't know.


    Have you checked out this list of major C++ applications?

    http://www.research.att.com/~bs/applications.html


    Things like telecom, CAD, games, operating systems, compilers,
    databases, web servers, and Java VMs :)



    Bo Persson
    Bo Persson, Oct 20, 2008
    #7
  8. Matthias Buelow has written:
    > Achim Schneider wrote:
    >
    >> So, here's my question: What kind of program/project is C++'s home
    >> turf, where you just can't get around using it on a big scale (that
    >> is, excluding library interfaces and small amounts of generated code)?


    C++ is best suited for large system programming projects.
    By "large", I mean that requires at least four developers working for at
    least four years.
    You can try to develop a device driver or a bytecode interpreter.

    > The one you want to burn most money on. C++ must be the least productive
    > language I've ever had the displeasure to come across.


    Of course you never came across system programming languages.

    > On a different note, it's more or less the only choice for portable GUI
    > applications, because of wxWidgets and Qt, as long as you don't want to
    > use Java, that is.


    I think that C++ is not the best language to build portable GUI
    application, and needless to say it is not the only one.
    GUI application code is not standardized, hasn't tight speed and memory
    requirements, and requires quick builds, so C++ doesn't shine for that
    purpose.
    It is a good language to implement a GUI toolkit (as wxWidgets or Qt),
    though.

    > If you know Scheme or Haskell well, you will weep.


    There are many people who know Scheme or Haskell and don't weep when
    using C++.

    --
    Carlo Milanesi
    http://digilander.libero.it/carlmila
    Carlo Milanesi, Oct 20, 2008
    #8
    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. Patrick.O.Ige
    Replies:
    1
    Views:
    432
  2. Uncle Bob (Robert C. Martin)

    Use Cases -- A minimalist's View

    Uncle Bob (Robert C. Martin), Jul 2, 2003, in forum: Java
    Replies:
    0
    Views:
    750
    Uncle Bob (Robert C. Martin)
    Jul 2, 2003
  3. Alan Cyment
    Replies:
    1
    Views:
    1,351
    Esmond Pitt
    Jan 29, 2004
  4. Andreas Pauley

    Point of Sale Use Cases

    Andreas Pauley, May 26, 2005, in forum: Python
    Replies:
    0
    Views:
    416
    Andreas Pauley
    May 26, 2005
  5. Jp Calderone

    Re: Use cases for del

    Jp Calderone, Jul 6, 2005, in forum: Python
    Replies:
    35
    Views:
    839
    Terry Reedy
    Jul 10, 2005
Loading...

Share This Page