Off-side rule

The off-side rule describes syntax of a computer programming language that defines the bounds of a code block via indentation. [1] [2]

The term was coined by Peter Landin, possibly as a pun on the offside law in association football.

An off-side rule language is contrasted with a free-form language in which indentation has no syntactic meaning, and indentation is strictly a matter of style.

An off-side rule language is also described as having significant indentation.

  1. ^ Hutton, G. (December 6, 2012). "Parsing Using Combinators". In Davis, Kei; Hughes, John (eds.). Functional Programming: Proceedings of the 1989 Glasgow Workshop 21–23 August 1989, Fraserburgh, Scotland. Springer Science & Business Media. pp. 362–364. ISBN 9781447131663. Retrieved September 3, 2015.
  2. ^ Turner, D.A. (August 13, 2013). "Some History of Functional Programming Languages (Invited Talk)". In Loidl, Hans Wolfgang; Peña, Ricardo (eds.). Trends in Functional Programming: 13th International Symposium, TFP 2012, St Andrews, UK, June 12–14, 2012, Revised Selected Papers. Springer. p. 8. ISBN 9783642404474. Retrieved September 3, 2015.