[Beowulf] Stroustrup regarding multicore
Robert G. Brown
rgb at phy.duke.edu
Thu Aug 28 06:00:00 PDT 2008
On Wed, 27 Aug 2008, Perry E. Metzger wrote:
> Ed Hill <ed at eh3.com> writes:
>> So, I'm curious about what you consider "legitimate"
>> and why. And please understand -- I'm not trying to start arguments or
>> change any opinions about language choices [ other than perhaps my own
>> :-) ].
> It is pretty straightforward. C++ is a big mess -- the language
> specification is too large for me to fully remember, it is easy to
> produce constructs that are very difficult to understand. Things like
> operator overloading encourage people to write unreadable code -- you
> can examine a short section of a program and not realize that all the
> familiar operators you think are doing one thing are doing unexpected
> things. The language is a maintenance programmer's nightmare, and most
> of the time, programs are being maintained, not developed.
Ya, Ed, the satire I posted a link to is a satire, but the things it
satirizes are real issues and recapitulates a lot of what Perry just
said. It is fairly difficult to keep track of all the structs and
typedefs in a complicated C program. People tend to write code with a
proliferation of includes, variables with a limited scope, structs in
one include that include structs defined in another. And this isn't
necessarily bad stylistically -- complex problems are complex, and big
code evolves, it isn't topdown designed (or at least, it may be topdown
designed "once" or even "twice" but in between it evolves).
However, this does make maintenance of the code or working on somebody
else's code very difficult if one lets this sort of thing get out of
control -- in C. The problem is, I dunno, squared in C++? As Perry
describes. On the other hand there is the STL, which is interestingly
more often touted as a C++ advantage than "objects" per se, probably for
good reason (as C has objects, but it doesn't really have the STL).
>> If I had to sum it up in one line it would be: "I'm use C++ a lot because
>> I just can't seem to find a superior replacement for it."
>> And I'm still (half-heart-edly) looking for replacements...
And obviously, you don't consider C alone to be a viable replacement,
which is fine.
> That's the reason many people end up using it, including (sometimes) me.
> Many smart people use C++, few smart people love C++.
Robert G. Brown Phone(cell): 1-919-280-8443
Duke University Physics Dept, Box 90305
Durham, N.C. 27708-0305
Book of Lilith Website: http://www.phy.duke.edu/~rgb/Lilith/Lilith.php
Lulu Bookstore: http://stores.lulu.com/store.php?fAcctID=877977
More information about the Beowulf