C++ shines in what application domains?

J

Joe Van Dyk

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
 
J

Jim Langston

Joe Van Dyk said:
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.
 
J

Joe Van Dyk

Jim said:
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
 
M

Markus Schoder

Joe said:
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
 
P

phlip

Joe said:
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
 
C

Cy Edmunds

Joe Van Dyk said:
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
 
J

Joe Van Dyk

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

How does C++ excel at 3D graphics?

Joe
 
R

res7cxbi

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

Phlip

res7cxbi said:
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!

;-)
 
J

Jerry Coffin

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

frankgerlach

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

Tomás

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,
 
J

Jerry Coffin

@j73g2000cwa.googlegroups.com>, (e-mail address removed)
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;
 
T

Tomás

Jerry Coffin posted:
@j73g2000cwa.googlegroups.com>, (e-mail address removed)
says...

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
 
J

Joe Van Dyk

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
 
W

W Marsh

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++"?
 
K

Kirk McDonald

Cy said:
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
 
J

Joe Van Dyk

W said:
>

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

Cy Edmunds

Kirk McDonald said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top