One of the famous papers in computing, “The Next 700 Programming Languages,” by P.J. Landin, talks about the 1,700 languages already cluttering up the computing landscape. It was written for an academic journal and has a wonderfully accurate, koan-like opening statement: “Most programming languages are partly a way of expressing things in terms of other things and partly a basic set of given things.” It was published in 1966.
A few of those 1,700 languages are still with us.Cobol, for example, a legendary and much-hated, extremely verbose language that was intimately linked to the “year 2000” problem. As computer scientist Dijkstra once described it, “The use of Cobol cripples the mind; its teaching should, therefore, be regarded as a criminal offence.” While no one sings its praises (except for banks—banks love Cobol), it still runs on mainframes. Fortran, for Formula Translating System, by John Backus, and LISP, for List Processor, by John McCarthy (eventually it was lowercased to Lisp, just as UNIX became Unix), were both developed in the 1950s, in the days of Desk Set-style computers fed by huge tapes or paper cards, and both are still in use today. The power granted by Fortran was inherent in its name—it looks almost comically computerish:
PROGRAM SQUARES
CALL SQUARE(10)
END
SUBROUTINE SQUARE(N)
SUM = 1
DO 10 I = 1, N
WRITE (*,'(I10,$)') (I*I)
10 CONTINUE
PRINT *, ""
END
That’s the same program that we wrote in C, page 50, the one that
ever-so-usefully prints a list of squares. You can pick up the weird
metallic smell of large computer centers with raised floors just by
looking at some Fortran.
It excels at the numerical computing needed by scientists and still beats C for some tasks. Physicists and astronomers like (well, live with) Fortran. Lisp, though, is another kind of beast. It emerged straight out of mathematical research. There are many things that made Lisp peculiar. Some people say it stands for “Lots of superfluous parentheses.”
(defun squares (count)
(dotimes (n count)
(format t "~a " (* (+ n 1)
(+ n 1)))))
(squares 10)
Back in the 1980s, while the Fortran programmers were off
optimizing nuclear weapon yields, Lisp programmers were trying to get a
robot to pick up a teddy bear or write a sonnet. But one day, the people
who ran the funding parts of the world came in, yelled, “Shut it all
down,” and pulled a big red switch (which was probably programmed in
Fortran). The Lisp programmers, who had yet to simulate a human brain or
automatically produce a great sonnet, were left with only regret.
The Lisp machine companies began to shut down and sell off their assets. Students were more likely to learn C or Java. Lisp became a cautionary tale, its unique, unified vision of the computer a fond memory of a better era. And yet … There’s still quite a bit of Lisp in the world, such as in the air-travel data system built by ITA, which was acquired by Google. When you Google “flight from nyc to berlin,” ITA is in there in the background, running Lisp. There was a time when Lisp looked to be deader than ancient Greek: a beautiful philosophical system, but not practical.
Lisp blurs the line between code and data in the way it allows functions to refer to themselves. It works, but it’s a little much to ask a regular programmer to see the world as infinitely programmable. We need clarity.
Which means we really need to talk about data.
No comments:
Post a Comment