My recent posting entitled A Reader Bleakly Asks About the Future of
C++ has generated more than my usual run of comments – and which have run
the gamut of celebrating the rebirth of C++ to mourning its passing. Rather than
addressing this or that point, I thought I would use this thread as a cover for
writing up some of my recent fumblings about what imo programming languages are,
why most of them stop being used, and why people get so gosh darn passionate
about them. I call it Towards a Natural
Theory of Programming Languages – towards because it is something of an
outline, and natural because, well,
you’ll see. Hopefully it will find some resonance with folks, or at least
generate a few more comments.
What language did the first
computer use? No, it wasn't Java or C#! Here, let's make it a multiple
choice:
(1) A binary
machine code: 0110000101100100011001000000010100000111
(2) A
hexadecimal machine code: 061064064005007
(3) An
assembly language: addi 5 7
(4) FORTRAN: 5
+ 7
The surprising answer is None of the Above. Oddly enough, the
idea of an independent program – let alone the idea of a programming language –
was missing from the invention of the electronic computer. Rather than a stored
program, cables were plugged into one configuration to calculate this equation
then reconfigured to calculate a second, and so on. Certainly, this must be the
origin of the term tight coupling. The original computational
environment did not support the notion of software. It was hardware and largely
hardwired.
Programs Dwell in a Computational
Environment
The modern computing era began
without the concept of either a program or a programming language. The
immediately intractable problems were hardware: a particular daunting problem
was the operational life of the vacuum tubes. Many skeptics argued that the
tubes would prove too volatile to support sustained calculation. That is, that
an electronic computer was not possible.
It was only after the successful
demonstration of a working computer – in an analysis of its operational behavior
– that the notion of a stored program arose. And this was a binary machine code
rather than language. That is, the eventual introduction of the program solved
the logistical bottlenecks of the
pre-existing computational environment. The introduction of a stored program
decoupled from the state of the machine represents the indirect origin of our
profession, not the invention of the computer itself. This decoupling has only
accelerated.
The
Evolution of Complex Structure
Software did not begin as
software. It was a hard-wired configuration – a dance without a distinct dance
notation. This evolved into a reproducible program bit map that could be loaded
and flushed from memory: a purely coded numeric representation. The assembler
introduced a rudimentary symbolic program representation at the level of
individual instructions that could be grouped by function. There was still no
notion of a vocabulary but only of a code.
The invention of the programming language
was both a concession and a boon to human nature – the ghost in the
computational machine. It solved yet another logistical bottleneck, permitting
an exponential expansion of both the computational environment and the
percentage of human population devoted to its nurture.
A
Natural Theory of Programming Languages
A successful programming language
is always a response to a pre-existing computational environment:
(1) it
facilitates expression within a current environment – that is, it has immediate
application. It competes for attention.
(2) it
improves on one or a set of existing solutions – that is, progress in a certain
area is perceived to have faltered due to identifiable problems that the
language demonstrably improves on.
(3) it
provides both a vocabulary and shared perspective that exhibits aspects of
devotion – that is, a sense that it embodies an objective truth absent in other
languages. It is not just a tool; it is a culture.
Programming languages historically come in
a marketplace hierarchy – or environmental niche ...
·
FORTRAN vs. LISP vs.
ALGOL vs. COBOL
vs. shell
·
Simula67
vs. PROLOG vs. ALGOL68 vs. PL1 vs. AWK
·
SmallTalk
vs. CLOS vs.
Ada/C++ vs. VB vs.
Perl
·
Java/CLI vs. ML
vs. C++
vs. VB
vs. Python
All
Languages Become Extinct
As the computational environment
changes …
·
the more specialized and successful the language is within
the previous computational environment, the more difficult it is for it to adapt
to the new environment.
·
it fails to reproduce in the minds of the newer members of
the community – that is, its population drops off.
·
dropping below a certain threshold, it no longer has the
critical mass to support active development.
·
the leaders of the existing population attempt to readapt
the language to the changing environment; however,
o
the historical accumulation of structure often seems to
overwhelm these efforts.
o
it is as if the conditions that give rise to a language's
success are intrinsic to its eventual extinction.
In general, there are far more extinct
than active programming languages.
Programming Languages are Not
Language
All programming languages address
the same basic domain.
·
They differ in their vocabulary and level of detail.
·
They are more or less formal hypotheses about the
environment and the programmer community that wishes to exploit that
environment.
·
The success or failure of a language in that environment is
the experiment. Those of use who design languages collect data and make
adjustments.
·
As long as the computing environment changes, there will
always be new languages and adaptations of older languages.
Anyone involved in the invention or use of
a programming language functions as an advocate of that language, and is not
without bias.
brief notes:
The first obvious objection
to this theory, if you will, is to raise historical counter-examples: Ada
Lovelace, Leibniz's universal characteristic. But none of these were actually
realized, and had no telling influence at the outset of the modern computing era
-- that i could tell from my superficial readings. Rather, once the invention of
programming languages took root, folks combed the historical record for
precedent, imo.
There are a number of
natural language myths that bleed into assertions made about programming
languages as well. Do we think in language? No, that is not the finding of
current neuroscience as I understand it, albeit somewhat feebly. Does one
language facilitate thought over another? Again, my understanding of the
evidence is that the answer is no.
If you step back from our
bickering over programming languages, you can't help but be astonished at how
little science we put into our discussion.