[Haskell-cafe] Lazy series [was : Preventing sharing]
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Sat Jan 9 17:36:54 UTC 2016
On Sat, Jan 09, 2016 at 06:29:05PM +0100, Jerzy Karczmarczuk wrote:
> 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 allow XXXX.
> So, your nice syntax has nothing to do with laziness. QED".
Granted, but the more important point was the sketch of the strict language
which *does* allow it. You have conveniently failed to challenge me on
any of the aspects of the very simple design.
> Tom, construct such a language, and I might believe you.
I remind you that Doug's original claim was "this won't work in a strict
language", which he offered without proof, even a sketch of a proof. I
still hold the onus is on you (or him) to demonstrate it!
> 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.
Maybe since Scheme and Racket are not typed things will go through there. I
shall have to look into it. I don't know the languages.
More information about the Haskell-Cafe