[PRL] proper tail recursion

Carl Eastlund carl.eastlund at gmail.com
Sun Oct 3 02:58:39 EDT 2004


On Sun, 03 Oct 2004 02:42:13 -0400, Dave Herman <dherman at ccs.neu.edu> wrote:
> I'm reading some papers on linearity, and they keep talking about how
> when you can prove that a resource is only used once you can implement
> it with destructive update, and this reminds me of proper tail
> recursion: when you can tell that the control context will not be needed
> again, you can destructively replace it. I wondered if there's a way of
> talking about control in terms of linearity.

There probably is, but surely tail recursion wouldn't correspond to
linearity.  After all, Scheme has proper tail recursion - but it also
has first-class continuations.  You can make tail calls from within
continuations that have quite a few references to them, so it's not
really linearity that gives that to us.

--Carl



More information about the PRL mailing list