July 08, 2011 — originally posted on The History of Python
The Dewar story is not about indentation, but about the invention of the colon.
First about indentation in B. Already B0, the first iteration in the B0, B1, B2, ... sequence of designs leading to ABC, had non-optional indentation for grouping, supplemented by enclosing the group between BEGIN and END delimiters. This can be seen in [GM76], section 4.1 (Layout). The indentation was supposed to be added, like pretty printing, by a dedicated B editor, and the user had no control over this; they were not supposed to be able to turn this off or otherwise modify the indentation regime.
Given the mandatory indentation, separate BEGIN and END delimiters are of course superfluous; in B1 we had no BEGIN, but only END IF, END FOR, and so on, and then the latter delimiters were also dropped in B2, leaving pure indentation as the sole indicator of grouping. See [ME81], Section 4 (STATEMENT SYNTAX).
The origin of indentation in ABC is thus simply the desire to have the program text look neat and be suggestive of the meaning, codifying what was already common practice but not enforced. The decision to remove the noise of BEGIN ... END may have been influenced by [PL75], which actually advocated using pure indentation for grouping. Since occam came later (1983), the feature can't have been copied from that language. Same for Miranda (1985). As far as I am aware, B was the first actually published (and implemented) language to use indentation for grouping.
Now the Dewar story, which is how I got the idea of the colon, as I wrote it down in a memoir of the ABC design rationale:
[PL75] P. J. Plauger. Signal and noise in programming language. In J. D. White, editor, Proc. ACM Annual Conference 1975, page 216. ACM, 1975.
[GM76] Leo Geurts and Lambert Meertens. Designing a beginners' programming language. In S.A. Schuman, editor, New Directions in Algorithmic Languages 1975, pages 1–18. IRIA, Rocquencourt, 1976.
[ME81] Lambert Meertens. Issues in the design of a beginners' programming language. In J.W. de Bakker and J.C. van Vliet, editors, Algorithmic Languages, pages 167–184. North-Holland Publishing Company, Amsterdam, 1981.
python3 — July 08, 2011
long time no see, maybe there is a typo?Guido van Rossum — July 08, 2011
Thanks, typo fixed!Anonymous — July 09, 2011
How many memories ... my first program 2 +2 = 4 written with python on the Commodore Amiga...Vasudev Ram — July 09, 2011
Interesting story, and also, by coincidence (and off-topic), referring to -Jeff — May 03, 2012
This is great; I'm planning to teach Python to programming novices (psychologists, specifically), and historical insights like this will be very nice additions to the material. Thanks for putting this down somewhere!Danny Yoo — May 03, 2012
Thank you for providing references to those papers!Anonymous — May 11, 2016
One time, Karin Dewar (my sister-in-law) showed me a geometry proof she had done in High School proving congruency of the sides (or base angles) of an isosceles triangle. It involved proving the triangle must be congruent to its mirror image (i.e. drawing the triangle on a piece of paper and flipping the paper over), and hence the base angles (or sides) must be congruent. I had never seen this idea mentioned anywhere (although subsequently a computer program apparently stumbled on it). She was one very smart lady ;)