470,848 Members | 1,189 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

C++ shines in what application domains?

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
May 23 '06 #1
20 3196

"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:Iz********@news.boeing.com...
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.
May 23 '06 #2
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

May 23 '06 #3
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
May 23 '06 #4
Jim Langston wrote:
"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:Iz********@news.boeing.com...
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
May 23 '06 #5

"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:Iz********@news.boeing.com...
Jim Langston wrote:
"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:Iz********@news.boeing.com...
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
May 23 '06 #6
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

May 24 '06 #7
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 '06 #8
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!!!
May 24 '06 #9
In article <Iz********@news.boeing.com>,
jo********@boeing.com 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.
May 24 '06 #10
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 '06 #11
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++....


May 24 '06 #12
OK:
cat my_message|sed /predominant/MAJOR/g >my_message_corrected

May 24 '06 #13
In article <1148481837.748730.55480
@j73g2000cwa.googlegroups.com>, fr**********@gmail.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.
May 24 '06 #14
Jerry Coffin posted:
In article <1148481837.748730.55480
@j73g2000cwa.googlegroups.com>, fr**********@gmail.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
May 24 '06 #15
re******@verizon.net 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
May 25 '06 #16
On Thu, 25 May 2006 17:30:20 GMT, Joe Van Dyk <jo********@boeing.com>
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++"?

May 25 '06 #17
Cy Edmunds wrote:
"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:Iz********@news.boeing.com...

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
May 26 '06 #18
W Marsh wrote:
On Thu, 25 May 2006 17:30:20 GMT, Joe Van Dyk <jo********@boeing.com>
wrote:

re******@verizon.net 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
May 26 '06 #19

"Kirk McDonald" <ki**************@gmail.com> wrote in message
news:44********@nntp0.pdx.net...
Cy Edmunds wrote:
"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:Iz********@news.boeing.com...

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.
May 26 '06 #20
Joe Van Dyk wrote:
W Marsh wrote:
On Thu, 25 May 2006 17:30:20 GMT, Joe Van Dyk <jo********@boeing.com>
wrote:
>
re******@verizon.net 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.


If you look at trivial examples language is mostly a non-issue.

The goal of 3D graphics is to come as close to reality as possible
(which Doom 3 is still far away from). This requires a high floating
point throughput to feed the graphics subsystem which again boils down
to numerical computation but I thought I still mention it for effect
:). As more and more work is done by the GPU this becomes less
pronounced of course.

May 26 '06 #21

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Harold Crump | last post: by
4 posts views Thread by Robert Vasquez | last post: by
15 posts views Thread by Untitled | last post: by
reply views Thread by a_newcomb | last post: by
reply views Thread by Carl Gilbert | last post: by
1 post views Thread by Martijn Mulder | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.