Home' Technology Review : January February 2007 Contents Q&A
TECHNOLOGY REVIEW /
In the 1980s and 90s, when he was
a researcher at AT&T Bell Labs,
the Danish-born computer sci-
entist Bjarne Stroustrup designed
C++, arguably the most in uential
programming language of the last 25
years. For all that, C++ is controver-
sial. The language is widely disliked
by the millions of programmers who
use it, largely because it is notori-
ously di cult to lear n and use, and
because Stroustrup s design permits
them to make serious programming
mistakes in the interests of maxi-
mizing their freedom of expression.
Today, Stroustr up is a professor of
computer science at Texas A&M
TR: Why is most software so bad?
Stroustrup: Some software is
actually pretty good, by any standard.
Think of the Mars Rovers, Google,
and the Human Genome Project.
Now, that's quality software! Our
technological civilization depends
on software, so if software had
been as bad as its worst reputation,
most of us would be dead by now.
On the other hand, the average
piece of software code can make
me cry. The programmers
clearly didn t think deeply about
correctness, algorithms, data
structures, or maintainability.
Most people don t know how bad
it is because they don t read code:
they just see Windows freeze or
have their cell phone drop a call.
How can we fix the mess we are in?
We can t just stop the world
for a decade while we reprogram
everything from our co ee machines
to our nancial systems. On the other
hand, muddling along is expensive,
dangerous, and depressing. Signi cant
improvements are needed, and
they can only come gradually. But
they must come on a broad front;
no single change will be su cient.
Looking at my own narrow eld
of programming-language design,
my view is that a good language can
be a major asset, but only when used
appropriately and well. A language
doesn t solve problems; it merely
helps the expression of solutions.
What makes for a good
Anything that helps people
express their ideas makes a language
better. A language should be good at
everyday tasks in the hands of good
craftsmen. It matters less whether the
language is beautiful in itself. There
are more useful systems developed
in languages deemed awful than
in languages praised for being
Isn t elegance important?
Elegance is essential, but how
do you measure elegance? The
lowest number of characters to
express the solution to a problem?
I think we should look for elegance
in the applications built, rather
than in the languages themselves.
It would be a stretch to call a
carpenter s complicated set of tools
(many quite dangerous) elegant.
On the other hand, my dining-
room table and chairs are elegant---
beautiful, really. That said, it would
of course be best if the language
itself was a beautiful work of art.
Is C++ too hard for most
It shouldn t be. To use C++ well,
you have to understand design and
programming technique. In a sense,
my critics are right: not everybody
should write C++, but then I never
claimed they should. C++ is designed
to allow you to express ideas, but if
you don t have ideas or don t have
any clue about how to express them,
C++ doesn t o er much help.
How do you account for the fact that
C++ is widely criticized and resented
by many programmers but is at the
same time very broadly used?
The glib answer would be, There
are just two kinds of languages: the
ones everybody complains about
and the ones nobody uses. The main
reason for C++ s success is simply
that it meets its limited design
aims: it can express a huge range
of ideas directly and e ciently.
In your book The Design and Evolution
of C++, you claim that Kierkegaard
was an influence upon your concep-
tion of the language. Is that a joke?
A bit pretentious, maybe, but not a
joke. A lot of thinking about software
development is focused on the group.
Corporate practices can be directly
hostile to individuals with exceptional
skills and initiative. I consider such
management of exceptional people
both cruel and wasteful. Kierkegaard
was a strong proponent of the
individual against the crowd. I can t
point to a speci c feature of C++
and say, "See, there s the in uence
of the 19th-century philosopher,"
reluctance to eliminate expert-level
features. I m not particularly fond of
his religious philosophy, though.
What do you regret the most?
No regrets! Well, of course I
dream of what I might have done
di erently and better---but who am
I to second-guess, say, 1984-vintage
Bjarne? He may have been less
experienced than I, but he was no
less smart, probably smarter, and he
had a better understanding of the
world of 1984 than I have. C++ has
been used to build many systems
that enhance our lives, and it has
been a signi cant positive in uence
on later languages and systems.
That s something to be proud of.
The problem with programming
Links Archive November December 2006 March April 2007 Navigation Previous Page Next Page