[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jan 27 18:19:04 1998 
Subject:Re: Complexity 
From: Robin Popplestone  
Volume-ID:980127.03 

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.

A quick look at "Algol 60 Implementation", by Randell and Russell, confirms
my recollection of  writing Algol 60.  The language supported  call-by-name
and call-by-value. The latter is described  by R&R as "a very much  simpler
concept", although  their  Whetstone Algol  compiler  (1-pass)  essentially
handled all procedure parameters as call-by-name, with a little  adjustment
within the procedure for call-by-value (Forward reference to procedures was
allowed so a  1-pass compiler  wouldn't know what  code to  generate if  it
hadn't yet seen the procedure signature).

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?)

Robin.