[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: expressions vs. statements
> This is actually a question people on this list might
> have interesting opinions about. Does distinguishing
> between expressions and statements buy you anything in
> expressive power? I have often wondered about what
> the point of this distinction was...
I assume John Backus isn't on this list, but we can get his opinion anyway,
from his 1977 Turing Award lecture
>From the abstract:
"Conventional programming languages are growing ever more enormous, but not
stronger. Inherent defects at the most basic level cause them to be both fat
and weak: their primitive word-at-a-time style of programming inherited from
their common ancestor -- the von Neumann computer, their close coupling of
semantics to state transitions, their division of programming into a world
of expressions and a world of statements, their inability to effectively use
powerful combining forms for building new programs from existing ones, and
their lack of useful mathematical properties for reasoning about programs."
Later on, he links the need for statements strongly to the need for
"Moreover, the assignment statement splits programming into two worlds. The
first world comprises the right sides of assignment statements. This is an
orderly world of expressions, a world that has useful algebraic properties
(except that those properties are often destroyed by side effects). It is
the world in which most useful computation takes place.
"The second world of conventional programming languages is the world of
statements. The primary statement in that world is the assignment statement
itself. All the other statements of the language exist in order to make it
possible to perform a computation that must be based on this primitive
construct: the assignment statement. This world of statements is a
disorderly one, with few useful mathematical properties."