From: dpbsmith@world.std.com (Daniel P. B. Smith)
Subject: Indentation: began with Algol. Maybe?
Organization: The World Public Access UNIX, Brookline, MA
Date: Sun, 23 Aug 1992 15:30:43 GMT

(I'm new to the net and don't know how to deal with topic drift. The
ORIGINAL question wanted to know when indentation was FIRST USED --
not examples of languages where indentation has a semantic function.
This addresses the ORIGINAL question).
I'd guess ALGOL started it. Here's why: 

In Saul Rosen's 1967, "Programming Systems and Languages," the 1960
Algol report clearly shows "modern" use of indentation. The 1957 paper
by Backus & al, "The FORTRAN Automatic Coding System," does not. Sammet's
1961 "Basic Elements of COBOL 61" shows a "hanging identatation" paragraph
style in individual statements, which tend to be more than one line long,
but not as a way of grouping multiple statements.  

"Highlights of a New Programming Language" (1965, describing what later
became PL/1, shows, in its introductory section, an UNindended FORTRAN
example; then a hierarchically indented ALGOL example; then, by golly,
the same example in PL/1 which has some indentation -- more than FORTRAN
but less than ALGOL!

My 1962 LISP 1.5 Programmers' Manual uses hierarchical indenting in the
M-expressions but not in the actual LISP S-expressions!

Here's my own provisional analysis.

The characteristics of the 026 and 029 keypunch tended to encourage the
use of a small number of fixed fields.  Using indentation was not
particularly natural. Furthermore, "word processing" did not exist.
So, in the world circa 1960, there was a mental distinction between
programming source code, which was NOT thought of as the same stuff
as English or business letters or mathematical typesetting.

Because ALGOL introduced the concept of a "publication language," it
was natural for the publication version to have rich, human-readable
characteristics such as indentation, which were assumed to be available
in a typesetting environment but not yet assumed to be natural to a
computational environment.

Once you joined the concepts of "typesetting" and "computer language,"
which first occurred in ALGOL, I think, it then became natural of
think of computer languages as having richer, typesetting-like elements,
so easily-supported things like indentation became institutionalized.

I think the critical thing to look at is LISP versus ALGOL.  I finally
saw it in black-and-white somewhere that the IF-THEN-ELSE statement
was personally introduced into Algol by McCarthy, i.e. "structured"
statements were in LISP first.  But I think indentation appeared in
ALGOL first (as normal practice).

I take it for granted that indentation was popularized by ALGOL and
spread throughout the educational community and via languages derived
from it, of which PASCAL is surely an example and C probably is.

Notice that BASIC, whose designers described it as "based on FORTRAN,"
was, originally, typically NOT indented.

So: I hypothesis that indentation pretty much coincided with the spread
of Algol, and that the REASON was that ALGOL had the concept of a
"publication language" and hence was the first time that the notion
that a computer language could look pretty or could contain typesetting
elements became popular.

Now all I want to know is: how long do we have to wait for development
environments to have full-fledged word-processor-like editors with
fonts, the ability to include pictures and diagrams, conditional text, etc.
The TeX source code book shows how it should be done!


-- 
Daniel P. B. Smith
dpbsmith@world.std.com
Newsgroups: comp.human-factors