Andrew Lentvorski wrote:
Christopher Smith wrote:
There are quite a few languages that do everything C++ can do, and
they do it much better.
All evidence to the contrary aside....
What evidence to the contrary? Popularity? That's about all I can
think of.
Popularity and success. Those are difficult things for languages to
achieve, and one is foolish to dismiss them out of hand or fail to
appreciate the reasons as to why.
When a language develops an entire book and vocabulary (Design Patterns)
simply to deal with the deficiencies of the language, that's some
pretty powerful evidence that the language is very broken.
I'm sorry, you just danced on my last nerve on this one. This is the
kind of willful ignorance that makes it hard to take people seriously.
Let's review:
- Design patterns originated in the Smalltalk/OOPSLA community (indeed,
the very same folks as were involved in Agile methods and such), not the
C++ community. Perhaps this is evidence of deficiencies in Smalltalk and
object-oriented proramming in general, but nonetheless, this is where it
was developed and where it caught on.
- The notion that one language is superior to another simply because one
can implement a design using native language keywords and operators
while the other must use a library is..... the kind of thinking that
leads to hideously complex syntaxes like... C++. ;-)
- One could write an entire book of design patterns for purely
functional languages (indeed, there are more than enough essays/white
papers on Haskell to assemble one right now), declarative languages,
scripting languages (Rails anyone? ;-), or whatever else is your
favourite pet programming language/style. In many cases tackling
problems that don't exist in the C++ world. It probably wouldn't sell as
well as designed patterns, but I doubt any of the adherents would agree
that this is an indication of the failings of their language.
I do *not* agree that C++ is a useful pedagogical language.
I don't really quibble with that. Few (perhaps hardly any?) languages
qualify as "useful" pedagogical languages.
Quoting:
Why C++ Matters
C++ brings to C the fundamental concepts of modern software
engineering: encapsulation with classes and namespaces, information
hiding through protected and private data and operations, programming
by extension through virtual methods and derived classes, etc. C++
also pushes storage management as far as it can go without full-blown
garbage collection, with constructors and destructors.
All of those are easily answered by Java or C# with the sole feature of
"pushing storage management as far as it can go without full-blown
garbage collection".
Quoting:
Why C++ Matters
C++ brings to C the fundamental concepts of modern software
engineering: encapsulation with classes and namespaces, information
hiding through protected and private data and operations, programming
by extension through virtual methods and derived classes, etc. C++
also pushes storage management as far as it can go without full-blown
Unfortunately, constructors and destructors are excruciatingly
difficult to get right in the presence of exceptions. The fact that
that you have to pull out about 3 different books to get this right
says that something is broken.
Or perhaps that there is something that can be learned.... ;-)
Most of the people who can actually explain clearly to me the
differences between destructors and finalization will observe that the
former is far more useful than the latter, and they both make it
difficult to accurately characterize the behaviour of a system
(finalizers manage to do so even without adding exceptions in to the mix
;-).
--Chris
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg