[Haskell-cafe] Re: [Haskell] Call-by-name: moved to haskell-cafe
wchogg at gmail.com
Tue Mar 20 16:14:09 EDT 2007
On 3/20/07, Dan Weston <westondan at imageworks.com> wrote:
> 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
> >>> "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".
Ah, but since everything on wikipedia is true yet the conclusion you reached
by beta-reduction is false, I believe you have shown that beta-reduction is
That's alright though, I never liked function application much anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe