C++ shines in what application domains?

Discussion in 'C++' started by Joe Van Dyk, May 23, 2006.

  1. Joe Van Dyk

    Joe Van Dyk Guest

    Hi,

    What application domains is C++ "best of breed" in?

    I can make strong arguments for C++ in embedded systems and realtime
    software, and that's pretty much it.

    Thanks,
    Joe
     
    Joe Van Dyk, May 23, 2006
    #1
    1. Advertising

  2. Joe Van Dyk

    Jim Langston Guest

    "Joe Van Dyk" <> wrote in message
    news:...
    > Hi,
    >
    > What application domains is C++ "best of breed" in?
    >
    > I can make strong arguments for C++ in embedded systems and realtime
    > software, and that's pretty much it.


    It tends to work good for games IMO, as the object oreintation fits well
    with "objects" in a game.
     
    Jim Langston, May 23, 2006
    #2
    1. Advertising

  3. Joe Van Dyk

    Joe Van Dyk Guest

    Jim Langston wrote:
    > "Joe Van Dyk" <> wrote in message
    > news:...
    >
    >>Hi,
    >>
    >>What application domains is C++ "best of breed" in?
    >>
    >>I can make strong arguments for C++ in embedded systems and realtime
    >>software, and that's pretty much it.

    >
    >
    > It tends to work good for games IMO, as the object oreintation fits well
    > with "objects" in a game.


    Oh yes, I left out (complex) games from my list. Although, games could
    be made with a "dynamic" or "scripting" layer, but it probably depends
    on the game as to what parts of the game should be in that scriptable
    layer. I have zero game experience, so I have no idea.

    Joe
     
    Joe Van Dyk, May 23, 2006
    #3
  4. Joe Van Dyk wrote:
    > Hi,
    >
    > What application domains is C++ "best of breed" in?
    >
    > I can make strong arguments for C++ in embedded systems and realtime
    > software, and that's pretty much it.


    - numerical computation (possibly with an extension similar to C99's
    "restricted" keyword)
    - 3D graphics
    - pretty much any "off the shelf" software for the mass market
     
    Markus Schoder, May 23, 2006
    #4
  5. Joe Van Dyk

    phlip Guest

    Joe Van Dyk wrote:

    > What application domains is C++ "best of breed" in?


    All the ones where you tried a more programmer-friendly language, and
    failed these criteria:

    - portability
    - deployability
    - performance
    - footprint
    - interoperability

    --
    Phlip
     
    phlip, May 23, 2006
    #5
  6. Joe Van Dyk

    Cy Edmunds Guest

    "Joe Van Dyk" <> wrote in message
    news:...
    > Jim Langston wrote:
    >> "Joe Van Dyk" <> wrote in message
    >> news:...
    >>
    >>>Hi,
    >>>
    >>>What application domains is C++ "best of breed" in?
    >>>
    >>>I can make strong arguments for C++ in embedded systems and realtime
    >>>software, and that's pretty much it.

    >>
    >>
    >> It tends to work good for games IMO, as the object oreintation fits well
    >> with "objects" in a game.

    >
    > Oh yes, I left out (complex) games from my list. Although, games could be
    > made with a "dynamic" or "scripting" layer, but it probably depends on the
    > game as to what parts of the game should be in that scriptable layer. I
    > have zero game experience, so I have no idea.
    >
    > Joe
    >
    >


    Most games today are written in C++ and a (often home-brewed) scripting
    language.

    Cy
     
    Cy Edmunds, May 24, 2006
    #6
  7. Joe Van Dyk

    Joe Van Dyk Guest

    Markus Schoder wrote:
    > Joe Van Dyk wrote:
    >
    >>Hi,
    >>
    >>What application domains is C++ "best of breed" in?
    >>
    >>I can make strong arguments for C++ in embedded systems and realtime
    >>software, and that's pretty much it.

    >
    >
    > - numerical computation (possibly with an extension similar to C99's
    > "restricted" keyword)
    > - 3D graphics


    How does C++ excel at 3D graphics?

    Joe

    > - pretty much any "off the shelf" software for the mass market
    >
     
    Joe Van Dyk, May 24, 2006
    #7
  8. Joe Van Dyk

    Guest

    Because the APIs that handles 3D graphics are supported, and sometimes
    only, in C++, and C++ is fast.

    For example, OpenGL and DirectX.

    You can always implement a 3D engine in any language, however, 3D
    Graphics require an intensive amount of computing power
    Languages like Java are more than capable for 3D engine, however, the
    performance may not be enough for any hard-core graphics.
    The speed of C++ makes it possible for programmers to create engines
    fast enough for their needs.
     
    , May 24, 2006
    #8
  9. Joe Van Dyk

    Phlip Guest

    res7cxbi wrote:

    > Because the APIs that handles 3D graphics are supported, and sometimes
    > only, in C++, and C++ is fast.
    >
    > For example, OpenGL and DirectX.


    Yup. Two magnificent examples of pure C++ there!

    ;-)

    --
    Phlip
    http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
     
    Phlip, May 24, 2006
    #9
  10. Joe Van Dyk

    Jerry Coffin Guest

    In article <>,
    says...
    > Hi,
    >
    > What application domains is C++ "best of breed" in?


    Depending on viewpoint, probably none -- for almost any
    individual application, there will often be a language
    that's at least arguably better. A large system, however,
    will often include applications that favor quite a few
    different languages, but trying to implement each in its
    own language becomes unwieldy. A common alternative is to
    ignore the absolute best for a specific application in
    favor of one that's close to that good, but for a much
    wider variety of applications.

    > I can make strong arguments for C++ in embedded systems and realtime
    > software, and that's pretty much it.


    C++ offers a combination of reasonable portability, a
    reasonable degree of low-level access to the machine, and
    a reasonable degree of high-level organization of the
    code.

    C++ offers relatively easy low-level access to things
    like raw memory (albeit, non-portably) that supports
    writing things like device drivers and operating systems.
    Likewise, its bit manipulation capabilities allow it to
    work reasonably well for things like encryption, network
    packet processing (e.g routing, computing CRCs) and so
    on.

    It has mid-level capabilities such as data structuring
    and modularity that make it reasonable for writing things
    like compilers, interpreters, virtual machines, network
    protocols, numeric processing, and so on. Many of these
    also depend (to varying degrees) on the lower-level
    capabilities as well, of course.

    It has high-level code-organization capabilities such as
    object orientation, exception handling, and templates
    that help considerably in controlling complexity while
    building larger systems.

    The first were mostly inherited from C. The last is
    (largely) what C++ added.

    --
    Later,
    Jerry.

    The universe is a figment of its own imagination.
     
    Jerry Coffin, May 24, 2006
    #10
  11. Joe Van Dyk

    Guest

    C++ is the *predominant* Operating System and standard software
    language. Most of the software we use daily is done in C/C++: Windows,
    Linux, Word, Photoshop and most other PC software. The reason for this
    is mostly efficency. Languages like Smalltalk and java are much
    friendlier to the programmer, but they are also much *slower*. I cannot
    imagine Photoshop being written in java - you would need a 1000 GHz CPU
    with probably 10 Terabyte of memory to do the same as a contemporary PC
    with the current Photoshop.
    Programmer-friendly languages like Ruby, PHP and java are popular on
    the server side, especially in custom-build enterprise applications. In
    that case database and network performance dominates, so execution
    speed does not matter that much. Of course database management systems
    such as MySQL, Oracle or DB/2 are performance-critical an (you guessed
    it) implemented in C/C++....
     
    , May 24, 2006
    #11
  12. Joe Van Dyk

    Tomás Guest

    posted:

    > C++ is the *predominant* Operating System and standard software
    > language.



    If C++ is the predominant language, then what's the dominant one?

    :)


    It's because of funky stuff like this in the English language that
    they're now using:

    combustible
    noncombustible

    rather than "inflammable".


    -Tomás

    Most of the software we use daily is done in C/C++: Windows,
    > Linux, Word, Photoshop and most other PC software. The reason for this
    > is mostly efficency. Languages like Smalltalk and java are much
    > friendlier to the programmer, but they are also much *slower*. I cannot
    > imagine Photoshop being written in java - you would need a 1000 GHz CPU
    > with probably 10 Terabyte of memory to do the same as a contemporary PC
    > with the current Photoshop.
    > Programmer-friendly languages like Ruby, PHP and java are popular on
    > the server side, especially in custom-build enterprise applications. In
    > that case database and network performance dominates, so execution
    > speed does not matter that much. Of course database management systems
    > such as MySQL, Oracle or DB/2 are performance-critical an (you guessed
    > it) implemented in C/C++....
    >
    >
     
    Tomás, May 24, 2006
    #12
  13. Joe Van Dyk

    Guest

    OK:
    cat my_message|sed /predominant/MAJOR/g >my_message_corrected
     
    , May 24, 2006
    #13
  14. Joe Van Dyk

    Jerry Coffin Guest

    In article <1148481837.748730.55480
    @j73g2000cwa.googlegroups.com>,
    says...
    > OK:
    > cat my_message|sed /predominant/MAJOR/g >my_message_corrected


    There's no need to get cat involved:

    sed < my_message /predominant/MAJOR/g > message_corrected

    Is there ever a reason to use:
    cat X | Y
    instead of:
    Y < X
    ?

    OOTC: it strikes me as being a bit like:

    if (x == true)
    y = true;
    else
    y = false;

    --
    Later,
    Jerry.

    The universe is a figment of its own imagination.
     
    Jerry Coffin, May 24, 2006
    #14
  15. Joe Van Dyk

    Tomás Guest

    Jerry Coffin posted:

    > In article <1148481837.748730.55480
    > @j73g2000cwa.googlegroups.com>,
    > says...
    >> OK:
    >> cat my_message|sed /predominant/MAJOR/g >my_message_corrected

    >
    > There's no need to get cat involved:
    >
    > sed < my_message /predominant/MAJOR/g > message_corrected
    >
    > Is there ever a reason to use:
    > cat X | Y
    > instead of:
    > Y < X
    > ?
    >
    > OOTC: it strikes me as being a bit like:
    >
    > if (x == true)
    > y = true;
    > else
    > y = false;
    >



    Am I the only one who hasn't got a clue what the last two posts are
    talking about?

    (My own post was meant to bemuse, nothing more)


    -Tomás
     
    Tomás, May 24, 2006
    #15
  16. Joe Van Dyk

    Joe Van Dyk Guest

    wrote:
    > Because the APIs that handles 3D graphics are supported, and sometimes
    > only, in C++, and C++ is fast.
    >
    > For example, OpenGL and DirectX.
    >
    > You can always implement a 3D engine in any language, however, 3D
    > Graphics require an intensive amount of computing power
    > Languages like Java are more than capable for 3D engine, however, the
    > performance may not be enough for any hard-core graphics.
    > The speed of C++ makes it possible for programmers to create engines
    > fast enough for their needs.


    There's OpenGL bindings for all of the mainstream languages, afaik.
    Since a lot of OpenGL (at least, the stuff I'm involved in) doesn't come
    close to being Doom 3 quality, or whatever, I don't see how C++ has a
    huge advantage over other languages (for non "hard-core graphics").

    Joe
     
    Joe Van Dyk, May 25, 2006
    #16
  17. Joe Van Dyk

    W Marsh Guest

    On Thu, 25 May 2006 17:30:20 GMT, Joe Van Dyk <>
    wrote:

    >There's OpenGL bindings for all of the mainstream languages, afaik.
    >Since a lot of OpenGL (at least, the stuff I'm involved in) doesn't come
    >close to being Doom 3 quality, or whatever, I don't see how C++ has a
    >huge advantage over other languages (for non "hard-core graphics").
    >
    >Joe


    Nothing from "or whatever" onwards has any bearing on the earlier part
    of the message.

    What logical process brings you from "a lot of OpenGL stuff isn't
    close to Doom 3 quality" to "where is the advantage with C++"?
     
    W Marsh, May 25, 2006
    #17
  18. Cy Edmunds wrote:
    > "Joe Van Dyk" <> wrote in message
    > news:...


    >>Oh yes, I left out (complex) games from my list. Although, games could be
    >>made with a "dynamic" or "scripting" layer, but it probably depends on the
    >>game as to what parts of the game should be in that scriptable layer. I
    >>have zero game experience, so I have no idea.
    >>
    >>Joe
    >>
    >>

    > Most games today are written in C++ and a (often home-brewed) scripting
    > language.
    >
    > Cy
    >
    >


    Many games embed a mainstream scripting language. Lua is popular; World
    of Warcraft uses it, for instance, as does Gary's Mod for Half-Life 2.
    Civilization IV is remarkable in that it is written about half in C++
    and half in Python; it uses Boost.Python for the interface between the
    two. Nearly all of Civ4's UI code and much of the AI logic is in Python,
    while the performance-intensive bits (the 3D engine, etc) are in C++.

    -Kirk McDonald
     
    Kirk McDonald, May 26, 2006
    #18
  19. Joe Van Dyk

    Joe Van Dyk Guest

    W Marsh wrote:
    > On Thu, 25 May 2006 17:30:20 GMT, Joe Van Dyk <>
    > wrote:
    >
    > wrote:
    >>>
    >>> Because the APIs that handles 3D graphics are supported, and sometimes
    >>> only, in C++, and C++ is fast.
    >>>
    >>> For example, OpenGL and DirectX.
    >>>
    >>> You can always implement a 3D engine in any language, however, 3D
    >>> Graphics require an intensive amount of computing power
    >>> Languages like Java are more than capable for 3D engine, however, the
    >>> performance may not be enough for any hard-core graphics.
    >>> The speed of C++ makes it possible for programmers to create engines
    >>> fast enough for their needs.

    >>
    >> There's OpenGL bindings for all of the mainstream languages, afaik.
    >> Since a lot of OpenGL (at least, the stuff I'm involved in) doesn't come
    >> close to being Doom 3 quality, or whatever, I don't see how C++ has a
    >> huge advantage over other languages (for non "hard-core graphics").

    >
    > Nothing from "or whatever" onwards has any bearing on the earlier part
    > of the message.
    >
    > What logical process brings you from "a lot of OpenGL stuff isn't
    > close to Doom 3 quality" to "where is the advantage with C++"?


    He/she said that a strong point of C++ was that it's fast enough to
    write high-end graphically-intensive OpenGL apps in. I have said that,
    in my experience, there aren't many OpenGL apps (outside of modern 3D
    games) that need that much speed.

    As a sample data point, Ruby's OpenGL "gears" program runs at
    approximately the same frames per second as the C version does.

    Joe
     
    Joe Van Dyk, May 26, 2006
    #19
  20. Joe Van Dyk

    Cy Edmunds Guest

    "Kirk McDonald" <> wrote in message
    news:447640c5$...
    > Cy Edmunds wrote:
    >> "Joe Van Dyk" <> wrote in message
    >> news:...

    >
    >>>Oh yes, I left out (complex) games from my list. Although, games could
    >>>be made with a "dynamic" or "scripting" layer, but it probably depends on
    >>>the game as to what parts of the game should be in that scriptable layer.
    >>>I have zero game experience, so I have no idea.
    >>>
    >>>Joe
    >>>
    >>>

    >> Most games today are written in C++ and a (often home-brewed) scripting
    >> language.
    >>
    >> Cy
    >>
    >>

    >
    > Many games embed a mainstream scripting language. Lua is popular; World of
    > Warcraft uses it, for instance, as does Gary's Mod for Half-Life 2.
    > Civilization IV is remarkable in that it is written about half in C++ and
    > half in Python; it uses Boost.Python for the interface between the two.
    > Nearly all of Civ4's UI code and much of the AI logic is in Python, while
    > the performance-intensive bits (the 3D engine, etc) are in C++.
    >
    > -Kirk McDonald


    Cool! As a sometimes Pythonista maybe I should buy a copy of Civ4.
     
    Cy Edmunds, May 26, 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. Alan Seunarayan

    Application Domains...

    Alan Seunarayan, May 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    449
    David Levine
    May 19, 2004
  2. Replies:
    0
    Views:
    411
  3. =?Utf-8?B?Unlhbg==?=

    One application... multiple domains

    =?Utf-8?B?Unlhbg==?=, Dec 15, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    573
    Joshua Flanagan
    Dec 17, 2005
  4. =?Utf-8?B?RmxlbW1pbmc=?=
    Replies:
    0
    Views:
    300
    =?Utf-8?B?RmxlbW1pbmc=?=
    Oct 16, 2006
  5. zoat
    Replies:
    1
    Views:
    121
Loading...

Share This Page