VIncent,<br>
I wouldn't look to Stroustrup for guidance about multicore (I'd look to
RGB :-) but he defines C++ and the C I use is a subset of the C++
copmpiler (genrally) But yeah, to me C++ is bloaty: compare
Stroustrup's gravid classic to K&R's gemlike classic..<br>
<br>
I mostly write in C, with the sense that basically it saves me writing
in assembly; and most of us, maybe all, use only a subset of C++; which
can pare down to K&R (within a whisker) if you like. Something like
C with Classes seems like a good middle ground between hierachism for
the programmer's comprehension and spare C for the machine's. <br>
Peter<br><br><div><span class="gmail_quote">On 8/25/08, <b class="gmail_sendername">Vincent Diepeveen</b> <<a href="mailto:diep@xs4all.nl">diep@xs4all.nl</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Well Stoustrup should be the last speaking about multicores, he better stick to single core.<br>
<br>
Let me explain.<br>
<br>
The experience learns that most C++ code from BIG companies not to mention organisations is factor 5 to 50 slower<br>
than an imperative implementation. Templates get used to declare variables and classes are very deep, not seldom<br>
10 subclasses deep before you actually see a few lines of code doing 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 lot (deep respect for that),<br>
costs hundreds of dollars to buy,<br>
so there is no clear hard definition easily available to programmers at home to figure out the optimization<br>
limitations that C++ allows. To get speed you need to know the exact 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 language.<br>
Clear definitions, not 5000 pages with what the language all "might be able to do for you".<br>
<br>
No one who learns at home is gonna pay to get that ISO of course and the language is getting that complex and even more<br>
complex, that programmers who try to learn it are busy half their 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 teamleader or manager. This is because C++ is the most<br>
complex programming language on the planet. It has changed. I've got 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 standardized sooner.<br>
<br>
Bjarne made c++ too complex however.<br>
<br>
College students who start C++ now, directly start using templates and never learn how to actually DECLARE a variable anymore.<br>
<br>
Object orientation is the opposite of what modern processors are good
at. First of all object allocation and deallocation is real<br>
slow and even the best C++ programmers have problems limiting the number of allocations that makes their software real slow.<br>
<br>
Additionally putting together code and data, as well as things like templates, makes code sizes real massive huge.<br>
This where for crunching power we'll see more and more tiny 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#. 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 in C#. In C++ you CAN incorporate C code easily<br>
as well as compiler intrinsics, even entire assembler programs (gcc). 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, usually have a low grade highschool,<br>
no university or at most 1 year college or so, if at all and know
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 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 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 imperative, where there is mechanisms, but not necessity,<br>
to split code and data, where you can declare anywhere new 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 from C/C++, to get programmers not extra confused.<br>
<br>
So instead of C++ something like Cr with the 'r' of 'realistic'. Something that is really usable for companies to get fast code<br>
at tiny processors meanwhile compatible with C libraries, which 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 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 name serious.<br>
<br>
Instead of trying to standardize the manner how to write a program in
C++ writing in clear statements that all kind of complex C++<br>
language such as templates should get avoided at all costs, except 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 worlds most complex language even more complex.<br>
<br>
Vincent<div><span class="e" id="q_11bfaf1078b8838d_1"><br>
<br>
On Aug 22, 2008, at 6:31 PM, Peter St. John wrote:<br>
<br>
</span></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><span class="e" id="q_11bfaf1078b8838d_3">
In this interview <a href="http://www.devx.com/SpecialReports/Article/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.devx.com/SpecialReports/Article/</a>38813/0/page/1
Bjarne Stroustrup talks about an upcoming C++ ISO standard,
C++0x (the same nomenclature as "C89", "0x" means the
specific year is undecided, it doesn't mean hex :-).<br>
<br>
He categorizes the additions in three ways, Concurrency, Language, and
Libraries; the concurrency part is about multicore support.<br>
<br>
He writes, 'Basically, the "concurrency" features will standardize the
basic layers needed to do systems programming in a multi-core world.
Obviously, facilities for doing that already exist in C++
implementations, but they are not standardized. I'd have liked to see
library support for some high-level concurrency models, but the
committee didn't have the time or consensus for that.'<br>
<br>
Peter<br></span></div>
_______________________________________________<br>
Beowulf mailing list, <a href="mailto:Beowulf@beowulf.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Beowulf@beowulf.org</a><br>
To change your subscription (digest mode or unsubscribe) visit <a href="http://www.beowulf.org/mailman/listinfo/beowulf" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.beowulf.org/mailman/listinfo/beowulf</a><br>
</blockquote>
<br>
</blockquote></div><br>