4 ms·
The reason you don't see many implementations of Scheme is that Java's calling conventions do not jive well with tail call optimization. This is the same reason
by deltasquared 14y ago
The reason you don't see many implementations of Scheme is that Java's calling conventions do not jive well with tail call optimization. This is the same reason that Clojure has the recur keyword: http://clojure.org/special_forms#Special http://clojure.org/special_forms#Special Forms--(recur exprs*)
- amalter 14y agoSee also Scala's compiler, which detects and re-writes tail calls as stackless iterations (http://oldfashionedsoftware.com/2008/09/27/tail-recursion-basics-in-scala/ http://oldfashionedsoftware.com/2008/09/27/tail-recursion-ba...)