On Mon, Aug 1, 2011 at 7:56 AM, Noel Grandin <noelgran...@gmail.com> wrote: > > That kind of coding is easily modelled by returning closures to a core event > loop routine. >
Maybe I'm missing something here, but closures are typically heap-allocated, whereas in Sebastian's scenario: > Sebastian Sylvan wrote: >> A counter-point is that those are the cases that could usually be >> rewritten as a loop anyway. The cases where tail-calls are >> indispensible are things like having a long running "server process" >> that branches on incoming messages and "jumps" to different states by >> tail calling to the appropriate function. I don't see there being any allocation? Remember that "constant space" is one reason why tail calls are desirable. Cheers, Tim -- Tim Chevalier * http://cs.pdx.edu/~tjc/ * Often in error, never in doubt “I cannot hide my anger to spare you guilt, nor hurt feelings, nor answering anger; for to do so insults and trivializes all our efforts. Guilt is not a response to anger; it is a response to one’s own actions or lack of action.” -- Audre Lorde _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev