programming languages

For those who think the world begins and end with C++, or with Java, here is a very incomplete list of programming languages: just the ones I've heard of, or been told about (not including assembly languages, or special purpose 'little languages' like yacc or nroff ).

19. A language that doesn't affect the way you think about programming, is not worth knowing.

-- Alan J. Perlis. Epigrams on Programming.
SIGPLAN Notices 17 (9):7-13, September 1982


Ada -- after Ada, Countess Lovelace , a friend of Charles Babbage , and claimed by some to be the first computer programmer.

Ada the language was commissioned by the US Department of Defense in the 1980s as the language to be used for all its software. Descended from Pascal , with support for structuring via the package .

The PL/I of the 1980s.

-- unknown

package Stack is
procedure Pop return INTEGER;
procedure Push(x:INTEGER);
procedure IsEmpty return BOOLEAN;
end Stack;



The mistakes which have been made in the last twenty years [of designing large overly-complex languages like Ada] are being repeated today on an even grander scale.
...
Gadgets and glitter prevail over fundamental concerns of safety and economy.

-- C. A. R. Hoare , "The Emperor's Old Clothes", CACM 24 (2), 1981


Algol -- " Algo rithmic L anguage"

Algol-60. Algol-68W. Algol-68. A family of procedural languages.

The more I ponder the principles of language design, and the techniques that put them into practice, the more is my amazement at and admiration of ALGOL 60. Here is a language so far ahead of its time that it was not only an improvement on its predecessors but also on nearly all its successors.

-- C. A. R. Hoare , "Hints on Programming Language Design", 1974

I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiences.

-- C. A. R. Hoare , "The Emperor's Old Clothes", CACM 24 (2), 1981
(on the design of ALGOL 68 v. Ada)


APL -- " A P rogramming L anguage"

Designer: Ken Iverson, in the late 1950s/early 1960s.

There are three things a man must do
Before his life is done;
Write two lines in APL,
And make the buggers run.


-- Stan Kelly-Bootle , The Devil's DP Dictionary , 1981

Famous for its enormous character set, and for being able to write whole accounting packages or air traffic control systems with a few incomprehensible key strokes.

[APL example]

APL, in which you can write a program to simulate shuffling a deck of cards and then dealing them out to several players in four characters, none of which appear on a standard keyboard.

-- David Given

Michael Gertelman has coded Conway's Game of Life in one line of APL :

[Game of Life example]

Dyalog has done even better (the web page includes a link to a YouTube video explaing how it works):

[Game of Life example]

APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.

-- Edsger W. Dijkstra, How do we tell truths that might hurt? EWD498, 1975


awk -- after the initials of its inventors: A ho , W einberger , K ernighan

An interpreted language with pattern matching, associative arrays, no declarations, implicit type casting, and C -like syntax. Wonderful for quickly hacking small special-purpose Unix filters; a nightmare when grown into large programs

BEGIN { FS = "\t" }
{ total[$4] += $3 }
END { for (name in total)
print name, total[name]
}




B -- a revised version of BCPL


Babbage -- after Charles Babbage , the inventor of the first (mechanical) computer
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

-- Charles Babbage, 1792-1871


BASIC -- " B eginners A ll-purpose S ymbolic I nstruction C ode"

An interpreted procedural language, originally invented in the 1960s for teaching, which has spread out of control.

It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

-- Edsger W. Dijkstra, How do we tell truths that might hurt? EWD498, 1975

 80  INPUT N%
90 IF (N% > M%) THEN 80
100 FOR I% + 1 TO N%
110 X(I%) = RND
120 NEXT I%
130 GOSUB 6000




BASIC is to computer languages what Roman numerals are to arithmetic

-- unknown
[that is, great for simple addition, a nightmare for more sophisticated long division]

BBC BASIC -- designed for Acorn's BBC micro -- added control structures and procedures, and is a greatly improved language, but is still suitable only for small programs.


BCPL -- " B asic CPL ", a modified version of CPL

Designer: Martin Richards.

LET SWAP(X,Y) BE
$(
LET TEMP = !X
!X := !Y
!Y := TEMP
$)





Bliss


C -- a revised version of B

Designer: Dennis Ritchie, Bell Labs in the early 1970s. A procedural language originally designed as a system programming language for the PDP, now out of control .

A language that combines all the elegance and power of assembly language with all the readability and maintainability of assembly language.

-- New Hacker's Dictionary

Variants: K&R C (Kernighan and Richie C). Ansi-C.

... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.

-- Robert Firth

for( i=0; (c=getchar())!=EOF && c != '\n'; i++ )
s[i] = c!='\t' ? c : ' ';

The above is everyday C code. (And some people who quite happily write this sort of stuff all day complain that Z is difficult "because of all those strange symbols"!) Obfuscated C , on the other hand, looks more like:

/*
 * HELLO WORLD
 * by Jack Applin and Robert Heckendorn, 1985
 */
main(v,c)char**c;{for(v[c++]="Hello, world!\n)";
(!!c)[*c]&&(v--||--c&&execlp(*c,*c,c[!!c]+!!c,!c));
**c=!c)write(!!*c,*c,!!**c);}

Eric Raymond

, ed. The New Hacker's Dictionary

The last good thing written in C was Franz Schubert's Symphony No. 9

-- Erwin Dieterich


C++ -- C incremented

Designer: Bjarne Stroustrup. C with object oriented extensions; even more out of control than C

C++ : where friends have access to your private members

-- Gavin Russell Baker

void f() {
olist ll;
name nn;
ll.insert(&nn);
name* pn = (name*)ll.get();
}




When your hammer is C++, everything begins to look like a thumb.

-- Steve Haflich, comp.lang.lisp, December 1994

> C++ has its place in the history of programming languages.
Just as Caligula has his place in the history of the Roman Empire?

-- Robert Firth (firth @ sei.cmu.edu) 94/03/18
as quoted by Dirk Craeynest at http://www.cs.kuleuven.ac.be/~dirk/quotes.html

Actually I made up the term "object-oriented", and I can tell you I did not have C++ in mind.

-- Alan Kay
The Computer Revolution hasn't happend yet : Keynote, OOPSLA, 1997

C++: "an octopus made by nailing extra legs onto a dog"

-- Steve Taylor, 1998

There are only two things wrong with C++: The initial concept and the implementation.

-- Bertrand Meyer


Chill -- C CITT Hi gh L evel L anguage

(where CCITT = Comité Consultatif International Télégraphique et Téléphonique)


Clean

A lazy, purely functional language, with "almost-as-good-as-C" efficiency.

/*  sieve of Eratosthenes */

primes :: [Int]
primes = sieve [2..]

sieve :: [Int] -> [Int]
sieve [prime:rest] =
    [prime:  sieve [i \\ i <- rest | i mod prime <> 0]]


CLU -- Clu sters

A modular procedural language, with a rich set of types and particular support for user-defined abstract data types, called clusters.


COBOL -- " Co mmon B usiness O riented L anguage"

Designer: Grace Murray Hopper. A verbose procedural language designed for business applications.

It aimed at readability but unfortunately achieved only prolixity

-- C. A. R. Hoare, "Hints on Programming Language Design", 1974

There is an amazing amount of COBOL "legacy code" or "dusty decks", which made COBOL programmers sought-after and rich tackling the Year 2000 problem.

The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense.

-- Edsger W. Dijkstra, How do we tell truths that might hurt? EWD498, 1975


COMAL -- " Com mon A lgorithmic L anguage"

An introductory programming language, used for teaching

FOR r#:=1 TO rows#-1 DO
  PRINT AT y#+r#,x#: CHR$(179),
  PRINT CHR$(179)
  ENDFOR

-- program fragment taken from a COMAL supplier site


CORAL -- " Co mmon R eal-time A pplication L anguage"


CPL -- " C ombined P rogramming L anguage"


Dynamo -- " Dyna mic Mo dels"

A descendant of Simple , used for the Limits to Growth models.


Eiffel

Designer: Bertrand Meyer . An elegant object oriented language, designed to support reuse, and including support for logical assertions.

putIth(v: like first; i:INTEGER) is
require
indexLargeEnough: i >= 1;
indexSmallEnough: i <= count;
deferred
ensure
not empty
end







Euclid


Forth -- " Fo u rth Generation Language"

Originally designed to control scientific instruments, in particular, telescopes.

If you learn the "Forth way" "correctly", you will grok in fullness procedural programming, without getting hung up in the irrelevant incidentals of syntax.

-- Mark Atwood, rec.arts.sf.written, Jan 2002

: CASE:
CREATE SMUDGE ]
DOES> SWAP 2*
+ @
EXECUTE
;





FORTRAN -- " For mula Tran slation"

If a variable is not declared, it is implicitly given a type based on its first letter ( I to N being integers, the rest floats), which led to the famous story of losing a spacecraft .

Consistently separating words by spaces became a general custom about the tenth century A.D., and lasted until about 1957, when FORTRAN abandoned the practice.

-- Sun FORTRAN Reference Manual

       DO 70 I = 1,3
N = KEY(1,I)
DO 50 J = 1,N
IF (KARD(J) .NE. KEY(J+1,I)) GOTO 70
50 CONTINUE
GOTO 200
70 CONTINUE
200 END






The primary purpose of the DATA statement is to give names to constants; instead of referring to PI as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of PI change.

-- FORTRAN manual for Xerox computers
[Some net-copies of this quote have the last digit as a 7. But pi=3.14159 26535 89793 23846 ... Is it a transcription error, or an error in the original manual? Is the whole quotation just a UL, or is it real?]

Variants: Fortran-II. Fortran-IV, roughly equal to Fortran-66. Fortran-77. Fortran-90 (previously Fortran-8X). Watfor = Waterloo Fortran. Ratfor = Rational Fortran (a preprocessor to add control structures to Fortran-66)


Gypsy


Handel-C

Designer: Ian Page. A language hiding an occam -like semantics underneath a C -like syntax, designed for compiling down to hardware, especially FPGA s.

prialt {
case louder ? any :
volume = volume + 1 ;
break ;
case softer ? any :
volume = volume - 1 ;
break ;
}
amplifier ! volume ;








Haskell -- after Haskell Curry , a logician

A functional language.


Icon

Designers: Ralph Griswold, Dave Hanson, Tim Korb. A string processing language, a descendent of Snobol , with structuring.

while line := read() do
if line := line[upto(wchar,line):0]
then return line[1:many(wchar,line)]


Java -- slang for coffee , the programmer's staple diet

Syntax like C++ "with all the nasty bits taken out". Compiles down to bytecode for a virtual machine, greatly increasing portability (if not performance).


Lisp -- " Lis t P rocessing language"

(or... L ots of I rritating S uperfluous P arentheses)

Designer: John McCarthy, MIT, late 1950s. A functional language, used mainly for AI applications.

55. A LISP programmer knows the value of everything, but the cost of nothing.

-- Alan J. Perlis. Epigrams on Programming.
SIGPLAN Notices 17 (9):7-13, September 1982

(DEFUN MEMBER (ITEM S)
(COND ((NULL S) NIL)
((EQUAL ITEM (CAR S)) S)
(T (MEMBER ITEM (CDR S)))))


If you learn Lisp correctly, you can grok all programming styles with it: procedural, OO, predicate, functional, pure or full of side-effects. Recursion will be your friend, function references your allies, you will truly know what a closure is, and that an argument stack is actually a performance hack. You will see that the most elegant way to solve a problem is to create a custom language, solve the generic problem, and have your specific one fall out as a special case. You will learn to truly separate intent from the bare metal, and you will finally understand the two deepest secrets, which are really the same secret, which we tell all, but so few understand, that code and data are the same thing, but organize your data and your code will follow.

-- Mark Atwood, rec.arts.sf.written, Jan 2002

Variants include: Scheme


Logo -- from the Greek logos , meaning 'word' or 'thought'

Designer: Seymour Papert. Turtle graphics

TO SQUARE
  REPEAT 4
    FORWARD 100
    RIGHT 90


Lucid

Designers: Ed Ashcroft and Bill Wadge, 1974. Lucid programs are intrisically parallel and provable.


Matlab

A matrix-based language that lets you write maths how it wants to be written, with hardly a loop in sight.

Example: take a 2D matrix M , perform a singular value decomposition, normalise the resulting vector of singular values s i to treat them as a vector of probabilities p i , and calculate the Shannon entropy H :

S = svd(M);
P = S/sum(S);
H = - dot(P,log2(P));


Miranda

A functional language.


ML

A functional language with modules, developed at the University of Edinburgh.

fun reverse ([], ys) = ys
| reverse (x::xs, ys) = reverse(xs, x::ys);


Modula -- " Modu lar La nguage"

Designer: Niklaus Wirth. A descendent of Pascal that added modules for large-scale structuring.

Variants: Modula, Modula-2, Modula-3.

DEFINITION MODULE InOut;
EXPORT QUALIFIED
EOL, Done, termCH;
CONST EOL = 36C;
VAR Done: BOOLEAN;
termCH: CHAR;
PROCEDURE OpenInput(defext: ARRAY OF CHAR);
PROCEDURE OpenOutput(defext: ARRAY OF CHAR);
END InOut.








Oberon -- after Oberon, a moon of Uranus (which was being passed by Voyager at the time)

Designers: Niklaus Wirth and Jurg Gutknecht.

An object oriented language descended from Pascal and Modula-2

DEFINITION Texts;
IMPORT Display, Files, Fonts;
CONST
replace = 0; insert = 1; delete = 2;
TYPE
Buffer = POINTER TO BufDesc;
BufDesc = RECORD
len: LONGINT
END;
PROCEDURE Append(T:Text; B:Buffer);
END Texts.










Objective C -- an object oriented C

Designer: Brad Cox. A hybrid object oriented language containing all of C and some Smalltalk -like method syntax.

float total = emptyWeight;
int i, n = [self size];
for (i=0; i<n; i++) {
id member = [self at:i];
total = total+[member weight];
}
return total;






occam -- after William of Ockham , and his Razor

A parallel programming language, based on Hoare's formal language CSP (Communicating Sequential Processes), supported by the inmos Transputer.

SEQ
ALT
louder ? any
volume := volume + 1
softer ? any
volume := volume - 1
amplifier ! volume






OPS5 -- " O fficial P roduction S ystem version 5 "

A rule based AI programming language


Pascal -- after Blaise Pascal

Designer: Niklaus Wirth in the late 1970s. A descendent of Algol , originally invented for teaching, which has spread out of control. (Uses semicolons to separate statements, rather than to terminate them, a cause of much grief.)

while not eof(fn) do
begin
read(fn,next);
sum := sum + next;
end




Perl -- " P ractical E xtraction and R eport L anguage"

(or... " P athologically E clectic R ubbish L ister", sometimes known as "the Swiss-Army chainsaw")

Python is executable pseudocode. Perl is executable line noise.

-- unknown

Designer: Larry Wall. A descendent of awk , and lots of other things.

Perl: The only language that looks the same before and after RSA encryption.

-- Keith Bostic

while ( <> ) {
next unless s/^(.*?):\s*//;
$HoL{$1} = [ split ];
}


Perl is the only language where you can bang your head on the keyboard and it compiles.

-- unknown

If you put a million monkeys at a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs.

-- anon


Pilot -- " P rogrammed I nquiry L earning o r T eaching"


PL/I -- " P rogramming L anguage 1 "

Criticised for being large and complex.

ON CONDSIGNAL (NEW) BEGIN
LINECOUNT = 1;
PAGECOUNT = PAGECOUNT + 1;
WRITE FILE(REPORT) FROM (HEADLINE);
END;



PL/I —"the fatal disease"— belongs more to the problem set than to the solution set.

-- Edsger W. Dijkstra, How do we tell truths that might hurt? EWD498, 1975


Pop-2, Pop-11 -- " Pop -2 for the PDP -11 "

An AI programming language, originally developed at the University of Edinburgh, then the University of Sussex

define doubleList(lst);
vars temp;
[] -> temp;
until lst = []
do temp <> [^(hd(lst)*2)] -> temp;
tl(lst) -> lst
enduntil;
temp
enddefine;








PostScript

Designed by Adobe. A stack-based procedural language, designed for driving laser printers and graphics.

currentpoint
4 2 roll exch 4 -1 roll exch
sub 3 1 roll sub
exch atan rotate dup scale
-1 2 rlineto
7 -2 rlineto
-7-2 rlineto
closepath fill







Prolog -- " Pro gramming in Log ic"

A logic language, used mainly for AI applications.

descendant(X,Y) :- offspring(X,Y).
descendant(X,Y) :- offspring(X,Z), descendant(Z,Y).
"How many Prolog programmers does it take to change a lightbulb ?"
"No."


Python -- after Monty Python's Flying Circus

Python is executable pseudocode. Perl is executable line noise.

-- unknown


Ruby

I always thought Smalltalk would beat Java , I just didn't know it would be called 'Ruby' when it did.

-- Kent Beck
Rick DeNatale -- Old Smalltalker’s perceptions of Ruby


SAS


Simple -- " S imulation of I ndustrial M anagement P roblems with L ots of E quations"


Simula-67 -- " Simula tion language"

Designers: Ole-Johan Dahl, Bjorn Myhrhaug, Kristen Nygaard. The first object oriented language, an extension of Algol 60 .

CLASS MEMBER;
BEGIN REF(MEMBER)NEXT;
PROCEDURE PUSHDOWN(L);REF(CHAIN)L;
IF L=/=NONE THEN
BEGIN NEXT:-L.FIRST;
L.FIRST:-THIS MEMBER;
END***PUSHDOWN***;
END***MEMBER***







Smalltalk

Designed by Xerox-Parc. A pure object oriented, untyped language.

^(self includes: aSymbol)
ifTrue: [self controlKeys at: aSymbol]
ifFalse: [aBlock value]


Snobol -- " S tri n g O riented Sym bo lic L anguage"

A string processing language, much used in the Humanities for textual analyses.

MORE  LINE = INPUT      :F(END)
LINE PAT :F(MORE)
OUTPUT = LINE :(MORE)
END



Tcl


TeX -- tau, epsilon, chi

Donald Knuth 's macro-based text formatting language, started in the late 1970s. Included here because of its incredible complexity, and because someone has written Towers of Hanoi , and 8-queens , in it (presumably just because they could).

\def\listoftables{\section*{List of Tables\@markboth
{LIST OF TABLES}{LIST OF TABLES}}\@starttoc{lot}}

Variants: LaTeX, AMS TeX


Turing -- after Alan Turing

Turing (and OOT) is a general purpose programming language designed specifically for teaching the concepts of computer science.

 % Roll a die until you get 6.  
 var die : int
    loop
    rand int (die, 1, 6)
        exit when die = 6
        put "This roll is ", die
    end loop
    put "Stopping with roll of 6"