Negative
Kevin Bealer
Kevin_member at pathlink.com
Wed Mar 1 17:22:06 PST 2006
In article <du5cao$237b$1 at digitaldaemon.com>, Walter Bright says...
>
>
>"Sean Kelly" <sean at f4.ca> wrote in message
>news:du51tu$1lvh$1 at digitaldaemon.com...
>> Walter Bright wrote:
>>>
>>> This suggests to me that RAII and try-finally are the wrong paradigms for
>>> doing transaction programming. I've attended Scott Meyer's insightful
>>> lecture on doing transaction programming in C++. There is no hope for it
>>> to be reliably done by anyone but experts.
>>
>> This is actually my concern about C++ in general. The language is
>> becoming so complicated--including the recommended solutions to common
>> problems--that I wonder if any but experts will be able to reliably write
>> correct code. And in my personal experience, C++ experts are few and far
>> between.
>
>True. I run into a lot of C++ programmers, but few who really enjoy it. They
>usually use C++ because they need the performance, not because they like it.
>
>The leading edge of C++ thought is to use increasingly complex templates for
>everything. The new C++0x proposed features are aimed at more complex
>template support.
I think this is C language history repeating itself. A book called Principia
Mathematica was once written, an attempt to build a minimal set of mathematical
axioms from which all others could be proven. It kept getting bigger and
bigger, but never had enough axioms. They wanted all necessary axioms, but none
that were provable from the others. Godel later proved that its impossible to
build such a list. But its a very magnetic idea for mathematicians.
C and C++ both strive to provide a sort of Principia for programming, a set of
language features from which all possible other features could be derived via
syntax, using macros, functions, and in C++, templates. They never want to add
anything that can already be defined with syntax.
The C language was kept simple, so if you wanted magic (as in, anything outside
the 'physics' of the language), you used the macro system. Like all magic, this
was 50% style and 50% fakery... If you poke at it, the illusion breaks down.
There were many "better" languages but nothing "better and committed in a big
way to high-performance code", until C++.
In C++, the language designers still feel pressured to keep things simple - e.g.
they try hard to avoid introducing keywords, and things like foreach are always
done in the STL not in the language. But they have a tendency to introduce
features and concepts that multiply the complexity of using the language. These
can't be done with macros, so they belong in the set of axioms. As they add
these multipliers, the knowledge needed to use it gets worse geometrically.
So the C++ team adds hard-to-implement/use stuff to the language, and rarely
adds easy-to-implement/use stuff, because the easy-to-implement stuff is doable
with macros/template magic. Macro/template language is much more powerful than
macro-only magic. But the illusion still breaks down ... everyone has an
ITERATE macro that doesnt quite work seamlessly.
>By doing this, C++ has opened the door wide for Java, Ruby, C#, etc. C++ is
>never going to go away, but it will increasingly marginalize itself as the
>C++ experts leave the average programmer further and further behind.
The plethora of similar languages creates division, which causes tension. The
performance and low level abilities of C and C++ is not available in Ruby, C#,
or Java. I know the gap you mention creates tension on the programming teams
I've been on. The C++ wonks want the others to just do the right think (use all
the advanced methods all the time). The others just want the compiler to stop
bugging them and get out of their way.
I think the crown might pass to any language that could fix C++ performance and
syntax... once it declared for the throne. D does very well syntactically and
performance wise, but I think it still has the "not ready yet" label stuck on
the front of the box, because of the sub-1.0 version and lack of ... (insert
wishlist items). (Question: What was the "trigger" that made people start
adopting Java for projects?)
Kevin
More information about the Digitalmars-d
mailing list