News for hackers. Stuff that matters.
Re:Clojure-scheme: Compiling Clojure to Native Code via Sche... by roryokane on Tuesday August 20, 2013 @10:47PM (#6247868)
I don’t know much Clojure, but I thought that lack of TCO was not a problem because you can just manually add `recur` (http://clojure.org/special_forms#Special%20Forms--%28recur%2...) when you need it. Are there situations where `recur` doesn’t work but tail-call optimization would help?
Re:Clojure-scheme: Compiling Clojure to Native Code via Sche... by takeoutweight on Tuesday August 20, 2013 @11:00PM (#6247919)
In my talk I use a finite state machine as an example of something that can really benefit from proper tail calls. In this case, the difference between proper tail calls and loop/recur is the difference between "compiling" the FSM and running the FSM in an interpreter loop.
Re:Clojure-scheme: Compiling Clojure to Native Code via Sche... by moomin on Wednesday August 21, 2013 @04:34AM (#6248865)
The quick answer is: mutually recursive functions. True TCO doesn't grow the stack when F calls G calls F again.