[Haskell] Call-by-name: moved to haskell-cafe

Dan Weston westondan at imageworks.com
Tue Mar 20 16:03:14 EDT 2007

Dan Weston wrote:
> Douglas Philips wrote:
>> On 2007 Mar 20, at 3:30 PM, Dan Weston indited:
>>> I looked up John Backus on wikipedia and followed a link to ALGOL:
>>> http://en.wikipedia.org/wiki/ALGOL_60
>>> where the following "undesirable" property of call-by-name is mentioned.
>>> "ALGOL 60 allowed for two evaluation strategies for parameter 
>>> passing: the common call-by-value, and call-by-name. Call-by-name had 
>>> certain limitations in contrast to call-by-reference, making it an 
>>> undesirable feature in language design. For example, it is impossible 
>>> in ALGOL 60 to develop a procedure that will swap the values of two 
>>> parameters if the actual parameters that are passed in are an integer 
>>> variable and an array that is indexed by that same integer variable. 
>>> However, call-by-name is still beloved of ALGOL implementors for the 
>>> interesting thunks that are used to implement it."
>>> I suppose that call-by-name is still beloved of Haskell implementors 
>>> as well?
>> Notice that the "problem" with call-by-name is when side-effects are 
>> involved. In a pure-functional-environment those "problems" don't 
>> arise...
>>             --Doug
> It was the phrase "making it an undesirable feature in language design"
>  that jumped out at me. Here "language" is an implicitly universally 
> quantified variable, and the phrase beta-reduces to "call-by-name is an 
> undesirable feature in Haskell design".

More information about the Haskell mailing list