Re: C++ programmer and assembly
On Apr 15, 10:59 am, "Mirek Fidler" <c...@ntllib.org> wrote:
BTW, I would like to know, all those people that believe that optimal
code does not matter anymory (or that compiler takes care about all
troubles):
I think many will agree that global optimization is 1st-order of
business, and local optimization should be used when it is known to be
necessary. A good example is crypto libraries. The GMP group, Maarten
Kronenburg, and others have written much of their public-key crypto in
vanilla C++. But when it comes time to a fundamental operation,
taking the modulus of one big integer over another, assembly-language
tweaking becomes extremely important. The difference in performance
is staggering (I forget exact numbers).
Why do not you use Jave, C# or Python instead?
One reason I believe is pratical:
Libraries, as you know. ;) Younger programmers know a pig when they
see it, and are far more likely to utter the word "pig" than use
euphemisms like "it grew organically" when they see GUI, networking,
or database code written in C++ (MFC). However, C++ can be made to
look like Java to certain extent, but only if the libraries are
present. But therein lies a problem: If I may use your U++ as example,
you have chosen to use your own container class [for which you have
100% empathy from me, as I never use STL either]. The problem here is
coherency. Yes, your libraries might be better, cleaner, more
functionally regular, able to fit with your GUI framework better, but
at the end of the day, its not the same container library that XYZ
corporation has been using. As you know, this incompatibility tends
to drive people away from C++ and toward languages where
incompatibility is not (in principle) a possibility. And yes, I do
believe that universally compatibility is an extremely dangerous
metric of any concoction.
Another reason I believe is far from practical, and has more to do
with a rather amusing characteristic human behavior:
There is an *extremely* large group of people who, if given their way,
would forbid _ANYONE_ to program in C++. They simply don't like the
idea that you might be doing something that they do not understand
(weird, yes, but true, IMO). It does not matter if what you are doing
is independent of what they are doing. They just don't like it. End
of story. So these people view Java and C# and .NET and Ruby and all
these mushroom languages as incarnations of The Great Savior...The
Holy One...who will gather his children in Programming Heaven and
their will be harmony, not disparity, for all. Think of it as
Programming Socialism - even if you, the Capitalist, live on the other
side of the island managing your own affairs in complete isolation,
that alone is enough. They will not tolerate this.
Where these two reasons merge is in a company where you have the
programming "Socialists" working with "Capitalists". The Socialists,
as mentioned, would rather that everyone be the same, regardless of
whether there is interdependency among languages. It also happens
that Socialists tend to be in the majority - they regard the
Capitalists as elitists. The village chief then has a problem. He
cannot tolerate strife in the village. More than 90% of his people
are angry at the Capitalists. Why? He does not know, but he must do
something about it to maintain order. He declares that the
Capitalists shall cease with using the "Disruptive C++" and use a
common language.
This process, coupled with the absolutely ridiculous proposition
believed by gullible managers that all languages can live together in
one giant happy .NET pot represents the biggest threat to C++.
However, there is a counter attack. If C++ were made to have _clean_
libraries, in GUI, networking, database etc...it could begin to
destroy these mushroom languages. I honestly believe that the day
will come when this starts happening.
In the meantime, we have to put up with perception and confusion.
-Le Chaud Lapin-
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]