<html>
<body>
<font size=3>Vincent,<br><br>
I have always said that C++ is computational science's cold fusion: lots
of power in, but no net gain.<br><br>
C is not much better. I once worked a young computational
programmer for almost a week to get him to prove to himself that a C
source program couldn't walk through a 2-d array the hard way as fast as
a Fortran source program unless the stepping was coded by hand. He didn't
believe that a 2-d array in C is syntactically a 1-d array of pointers to
1-d arrays, and the row pointers must be fetched from memory! And
separate compilation of functions with variable array dimensions? I
hear echoes of Kernighan and Ritchie laughing with each other "We
don't need no steenking libraries with execution-time array
dimensioning! We're system programmers here! Besides, if
somebody needs that they'll use Fortran."<br><br>
Sure, you may be able to use C++ to add reasonable array behavior to
C. But that's like writing a yacc script to build a compiler for a
language in which you can write your entire program with a single
executable statement.<br><br>
<br>
Mike<br><br>
At 11:36 AM 8/25/2008, you wrote:<br>
<blockquote type=cite class=cite cite="">Well Stoustrup should be the
last speaking about multicores, he <br>
better stick to single core.<br><br>
Let me explain.<br><br>
The experience learns that most C++ code from BIG companies not to
<br>
mention organisations is factor 5 to 50 slower<br>
than an imperative implementation. Templates get used to declare
<br>
variables and classes are very deep, not seldom<br>
10 subclasses deep before you actually see a few lines of code
doing <br>
something, and you<br>
never know which object gets allocated now and deallocated
there.<br><br>
Therefore for highend computations C++ is not very interesting.<br><br>
Add to that, the C++ standard (iso) where Bjarne has contributed to
a <br>
lot (deep respect for that),<br>
costs hundreds of dollars to buy,<br>
so there is no clear hard definition easily available to
programmers <br>
at home to figure out the optimization<br>
limitations that C++ allows. To get speed you need to know the
exact <br>
borders which compilers must follow.<br><br>
int a = 5;<br>
unsigned int x = 2;<br><br>
if( a == x )<br><br>
how C treats the above is easy. how does C++ treat it?<br>
Do you know?<br><br>
To program code for speed you need to know the EXACT limitations of
a <br>
language.<br>
Clear definitions, not 5000 pages with what the language all
"might <br>
be able to do for you".<br><br>
No one who learns at home is gonna pay to get that ISO of course
and <br>
the language is getting that complex and even more<br>
complex, that programmers who try to learn it are busy half their
<br>
life learning it. After many years, just knowing how to code C++,<br>
they already are too old to program a lot and feel ready to become
<br>
teamleader or manager. This is because C++ is the most<br>
complex programming language on the planet. It has changed. I've
got <br>
some C++ books from start of 90s here and none of them<br>
mentions things like templates.<br><br>
The C++ from the 90s was very useful for companies, had it been
<br>
standardized sooner.<br><br>
Bjarne made c++ too complex however.<br><br>
College students who start C++ now, directly start using templates
<br>
and never learn how to actually DECLARE a variable anymore.<br><br>
Object orientation is the opposite of what modern processors are
good <br>
at. First of all object allocation and deallocation is real<br>
slow and even the best C++ programmers have problems limiting the
<br>
number of allocations that makes their software real slow.<br><br>
Additionally putting together code and data, as well as things like
<br>
templates, makes code sizes real massive huge.<br>
This where for crunching power we'll see more and more tiny <br>
processors where having a lot of code is just slowing down.<br><br>
That said, C++ has basically a number of advantages over JAVA and
C#. <br>
Graphical you can do the same in visual studio<br>
with C++ like you can do with c++, so there is no reason to program
<br>
in C#. In C++ you CAN incorporate C code easily<br>
as well as compiler intrinsics, even entire assembler programs
(gcc). <br>
So you DO have the choice to hire a programmer who<br>
can speedup your code.<br><br>
The good C++ programmers who are really good in getting code done,
<br>
usually have a low grade highschool,<br>
no university or at most 1 year college or so, if at all and know
<br>
relative little about algorithms let alone optimization
techniques.<br><br>
That's your typical C++ coder. Bugfree code that's ugly slow.<br><br>
Over the past years i've helped out dozens of PHD's who didn't know
<br>
how to speedup their C++ code at all. Not even where to start.<br>
They know books from Stoustrup from head though and are in the
<br>
knowledge of all kind of details. Usually not seldom within days<br>
that results in factor 2 to 3 speedup.<br><br>
Writing yet another book with things that even most C++ scares in C+ +0x
is not very interesting IMHO, and just shows how much of<br>
a nerd a person can become.<br><br>
I'd argue there is a big need for a new language that is basically
<br>
imperative, where there is mechanisms, but not necessity,<br>
to split code and data, where you can declare anywhere new <br>
temporarily variables, and which has the potential to get the same<br>
speed like C code and where the language constructs are not far
away <br>
from C/C++, to get programmers not extra confused.<br><br>
So instead of C++ something like Cr with the 'r' of 'realistic'.
<br>
Something that is really usable for companies to get fast code<br>
at tiny processors meanwhile compatible with C libraries, which
<br>
dominate the open source world, with good reasons.<br><br>
So just the basic minimum that you need to make out of C a language
<br>
that big companies can use, without losing speed.<br><br>
Speed matters for mass software and highend.<br><br>
C++, JAVA and C# are just too slow to take a lecture with the below
<br>
name serious.<br><br>
Instead of trying to standardize the manner how to write a program
in <br>
C++ writing in clear statements that all kind of complex C++<br>
language such as templates should get avoided at all costs, except
<br>
when it has a clear benefit that other simpler straightforward code<br>
doesn't offer the opposite is gonna get spoken out in the
speech.<br><br>
What happens now with C++0x is yet another nerd addition to
make <br>
worlds most complex language even more complex.<br><br>
Vincent<br><br>
On Aug 22, 2008, at 6:31 PM, Peter St. John wrote:<br><br>
<blockquote type=cite class=cite cite="">In this interview
<a href="http://www.devx.com/SpecialReports/Article/" eudora="autourl">
http://www.devx.com/SpecialReports/Article/</a> 38813/0/page/1 Bjarne
Stroustrup talks about an upcoming C++ ISO <br>
standard, C++0x (the same nomenclature as "C89",
"0x" means the <br>
specific year is undecided, it doesn't mean hex :-).<br><br>
He categorizes the additions in three ways, Concurrency, Language,
<br>
and Libraries; the concurrency part is about multicore support.<br><br>
He writes, 'Basically, the "concurrency" features will
standardize <br>
the basic layers needed to do systems programming in a multi-core
<br>
world. Obviously, facilities for doing that already exist in C++
<br>
implementations, but they are not standardized. I'd have liked to
<br>
see library support for some high-level concurrency models, but the
<br>
committee didn't have the time or consensus for that.'<br><br>
Peter<br>
_______________________________________________<br>
Beowulf mailing list, Beowulf@beowulf.org<br>
To change your subscription (digest mode or unsubscribe) visit
<br>
<a href="http://www.beowulf.org/mailman/listinfo/beowulf" eudora="autourl">
http://www.beowulf.org/mailman/listinfo/beowulf</a></blockquote><br>
_______________________________________________<br>
Beowulf mailing list, Beowulf@beowulf.org<br>
To change your subscription (digest mode or unsubscribe) visit
<a href="http://www.beowulf.org/mailman/listinfo/beowulf" eudora="autourl">
http://www.beowulf.org/mailman/listinfo/beowulf</a></blockquote><br><br>
<br>
{Dad, Mike} <br><br>
________<br>
The notation {option1, option2} means <i>choose </i>option1 or option2,
and comes from the era of command-line computer programs and their
documentation.<br>
NYLLP = New York Local Liberal Paper aka The N__ Y___ T___s.<br>
Tinfoil Hats = Tin-foilers = Wackos of the Democrat base who think hatred
of Bush is a political principle </font></body>
</html>