[Haskell-cafe] A suggestion for the next high profile Haskell
project
Stefan O'Rear
stefanor at cox.net
Tue Dec 19 15:50:51 EST 2006
On Tue, Dec 19, 2006 at 08:42:06PM +0000, Neil Mitchell wrote:
> 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.
I don't know if any actual language does this, but your inlining problem can
be solved by letting _|_ = arbitrary behaivor. (Of course, I would want a
debugging option that gives errors on all arbitrary behaivior.)
More information about the Haskell-Cafe
mailing list