[Haskell-cafe] Lazy series [was : Preventing sharing]
jerzy.karczmarczuk at unicaen.fr
Sat Jan 9 17:29:05 UTC 2016
Tom Ellis wrote :
> consider a lazy language, Haskell--,/which doesn't allow recursive bindings of non-function types./ In Haskell-- you
> *cannot* write
> exps = 1 + integral exps
> but you have to write
> exps = I.fix (\e -> 1 + integral e)
> So we see that the nice syntax "exps = 1 + integral exps" is not due to
> laziness (since Haskell-- is lazy, but you cannot write that).
If you say so...
You may always say:
"Consider the syntax XXXX. Now, consider a lazy language which doesn't
So, your nice syntax has nothing to do with laziness. QED".
Tom, construct such a language, and I might believe you. Also, I recall
your former objection, that
*exps = 1 + integral exps*
should work "for lazy lists" in a strict language. Please, implement
it. Since you would need *letrec* anyway, I suggest Scheme (say,
Racket). You will see what that implies. Compare the behaviour of strict
and lazy Racket.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe