Robin Popplestone wrote:
>
> Dennis Yelle says:
>
> > My understanding is that Algol 60 got call-by-name by accident.
> > The attempt to specify call-by-value was done so badly that it
> > actually specified call-by-name.
[snip]
> I interpret their quotations from the Algol60 report as being a translation
> of the idea of normal-order-reduction of Lambda Calculus into this
> imperative context. So, call-by-name was seen (correctly from the
> comp.lang.functional point of view) as the default, with call-by-value as
> an efficiency kludge.
>
> From the implementor's point of view, you don't just stumble into
> call-by-name, because you've got to work at it. Indeed the nomenclature of
> the early Algol implementors, who talked of "thunks" has survived to this
> day in the functional language community for lazy evaluation. Nobody else
> talks of "thunks" or thinks about them either. (R&R don't talk of thunks -
> did this come from the Kidsgrove compiler or where?)
>
The Algol 60 report defines call by name as follows:
Any parameter not quoted in the value list is replaced, throughout the
procedure
body, by the corresponding actual parameter, after enclosing this
latter in
parentheses wherever syntactically possible.
This is however a formal definition, clearly not the expected
implementation method,
and without side effects could of course be implemented by call by
reference. So it
is unclear whether this is what was intended; not sure what date call by
reference
was invented.
The original thunks paper is "Thunks: a way of compiling procedure
statements with
some comments on procedure declarations" P. Z. Ingerman, CACM 4 #1 1961
pp55-58.
University of Pennsylvania: not sure if any connection to Kidsgrove.
Justin Cormack
|