Re:Writing a Lisp Interpreter in Go
by maxtilford on Thursday February 18, 2010 @11:07AM
(#1134434)
I think tail call elimination is handled in the Apply method for closures - http://github.com/bobappleyard/golisp/blob/master/lisp/lisp.... . Looks like a trampoline to me.
Re:Writing a Lisp Interpreter in Go
by andrewcooke on Thursday February 18, 2010 @12:03PM
(#1134605)
Ahhh. Thanks. After thinking about that I realised I don't understand Go's syntax :o)
Looking at evalExpr - http://github.com/bobappleyard/golisp/blob/master/lisp/lisp.... - the only way I can see for this to have tail call elimination is if Go itself does (and I don't think it does, does it? It does have coroutines, which you could use to implement trampolining, but I don't see that here...)