Using indentation for blocking

Denys Duchier Denys.Duchier at ps.uni-sb.de
Fri Sep 10 17:39:08 EDT 1999


"Fredrik Lundh" <fredrik at pythonware.com> writes:

>   "We will perhaps eventually be writing only small
>   modules which are identified by name as they are
>   used to build larger ones, so that devices like
>   indentation, rather than delimiters, might become
>   feasible for expressing local structure in the source
>   language."
> 
>   -- Donald E. Knuth, "Structured Programming with goto
>   Statements", Computing Surveys, Vol 6 No 4, Dec. 1974 

If memory serves, this (the offside-rule) was one of the many
visionary things proposed by Landin in his 1966 CACM paper "The next
700 programming languages".

While that idea is quite convenient for authoring programs manually,
it is a nuisance for automated processing, e.g. for macros (i.e. the
combination of textual program fragments).  In Haskell, you can use
indifferently a mix of indentation or braces and semicolons to convey
layout structure.  This is, in my opinion, a more reasonable
compromise.

-- 
Dr. Denys Duchier			Denys.Duchier at ps.uni-sb.de
Forschungsbereich Programmiersysteme	(Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45	http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50			Phone: +49 681 302 5618
66041 Saarbruecken, Germany		Fax:   +49 681 302 5615




More information about the Python-list mailing list