[Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

minh thu noteed at gmail.com
Tue Dec 19 16:03:07 EST 2006


2006/12/19, Neil Mitchell <ndmitchell at gmail.com>:
> Hi minh thu,
>
> > Lazy semantics -> equational reasoning ?
> > I thought that : lack of mutable state -> equational reasoning.
> > For instance, I think to data flow variable in Oz (whcih I really
> > don't know much / never used) : if a (Oz managed) thread attemps to
> > read the value of an unbound (data flow) variable, it waits until
> > another thread binds it. But the equational reasoning (referential
> > transparency) remains (and the evaluation is eager by default).
>
> Lack of mutable state, referentially transparent and laziness all help
> with equational reasoning. Inlining is much easier in a lazy language
> - and inlining is really handy for equational reasoning.
>
> Imagine:
>
> not_term = non_term
> f x = 12
>
> Now evaluating:
>
> main = f non_term
>
> In a lazy language the value is always 12, in a strict language its
> always _|_. Now let's inline f:
>
> main = 12
>
> In a lazy language the value is still 12, in a strict language the
> value has changed.
Sorry, I don't see how it has changed.
Isn't it still _|_ ?  i.e.

main = _|_

Thanks
minh thu


More information about the Haskell-Cafe mailing list