-calculus + syntactic sugar = a programming language?

In an influential paper, `The Next 700 Programming Languages', written in 1964, Peter Landin argued that all programming languages could and should be regarded as a way of making the -calculus palatable to human users by a coating of `syntactic sugar'. If we speak of functional languages, this view has won universal acceptance; while formally valid, it is often seen as less helpful and appropriate for procedural languages, and is rejected by most of the `logic language' community who see the rival predicate calculus as a more appropriate basis.

In Landin's view, the -calculus acts as a kind of mathematical analogue of machine code - it is a form that it is simple to reason about, in the same way that machine code is a form that it is simple for a machine to execute.

The SML formalism for a abstraction.

Let us take a preview of some `syntactic sugar' in ML and Modula-2. The calculus expression x. + x 2 is rendered in ML as

fn x => x+2

Here the is replaced by fn. This is hardly sugar at all, but reflects the poverty of the ASCII alphabet. Likewise the `.' is replaced by `$=>$', which avoids confusion with other uses of `.', e.g. as a decimal point, although we shall see that the syntactic constructions in which `$=>$' occurs in ML provide much more than simple abstraction. The last piece of syntactic sugar is to write `x+2' in place of `$+ x 2', in accordance with usual mathematical notation.

Another piece of syntactic sugar is the let construct in ML.

let val x = 3 in x+7 end
can be translated into -calculus as ( x. + x 7)3. Note that E1 and E2 in ( x. E1) E2 change their order in the let construct. This often accords with programming language practice.