Re: future of the C++
On Jun 28, 7:11 am, John G Harris <ne...@nospam.demon.co.uk> wrote:
On Sun, 27 Jun 2010 at 09:16:34, in comp.lang.c++.moderated, Le Chaud
<snip>>For example, during the middle of the 20th century, there was heated
debate about whether the phasor method, using basic trigonometry, or
the Laplace transform method, using complex analysis, was better for
circuit analysis for electrical engineers.
As it happens I was taught both phasors and Laplace transforms (in
1960). It was obvious that they were suited to different problems.
Hmmm...if, by "different problems", you mean "different student
audiences", I agree. But in both cases, the problem is circuit
analysis, and there is nothing that a phasor can tell me that I cannot
determine much more quickly using Laplace transforms and pole-zero
Likewise, different programming languages are suited to different
problem areas. For instance, Cobol is better than C++ at describing
alien data formats.
Yes, I would have to agree, but this misses my original point.
One must ask:
"All other things being equal, what is in the mind of a COBOL-only
programmer vs. C++-only programmer?"
The imagery that manifests in the minds of each might be more or less
the same if the problem is the same:
"Write a program to send out reminders to all customers whose frequent-
flyer miles are to expire within 30 days."
To solve this problem, both programmers might think about FOR loops,
the C++ programmer thinking FOR/DO/WHILE, the COBOL programmer
apparently thinking PERFORM. Both programmers might think about what
email-interface API is available. And so on.
But watch what happens when we change the problem:
"Write a device driver to encrypt all packets exiting a 1Gb/s Ethernet
adapter using 256-bit AES."
The C++ programmer might find the answer after some fidgeting. The
COBOL programmer's mind will go blank.
Note that the fundamental issue here is not insufficiency of the
language: that COBOL cannot be used to write device drivers. We can
easily solve the insufficiency problem by presenting a third,
fictitious language, XYZ, that might be used by both programmers:
"You have 3 hours to implement a basic skeletal driver using this new
XYZ language that is legendary for implementing device drivers."
In that case, the C++ programmer would rummage through XYZ, hunting
for primitives that s/he is confident transcends all languages
suitable for implementing device drivers. The COBOL programmer's mind
would still remain blank.
This is why, whenever a young person asks,
"Which language should I learn to be a good programmer?"
We should take into consideration what is really being asked, and
respond with another question:
"What scope of understanding do you want in the field of software
If the answer is, "I don't care. I just want to do some number
crunching.", then many languages will do.
If the answer is "I want to know what's really going on...", then a
good answer is "C++", because it is very hard to know C++ well and not
know what's really going on.
-Le Chaud Lapin-
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]