Re:Anonymous Recursive Functions in Racket
by skrishnamurthi on Sunday September 07, 2025 @04:47PM
(#45161973)
Thanks for the pointers. Trampolining is an old idea for obtaining tail-calls. It's a kind of folk-wisdom that has been rediscovered many times, as the related work here shows:
https://dl.acm.org/doi/pdf/10.1145/317636.317779
Usually the trampoline is implemented automatically by the language rather than forcing the author to confront it, though I can see why Clojure might have chosen to put the burden on the user.
Re:Anonymous Recursive Functions in Racket
by adityaathalye on Monday September 08, 2025 @04:04AM
(#45165731)
Yeah, Rich's HOPL lecture covers that ground...
https://clojure.org/about/history
> Clojure is not the product of traditional research
> and (as may be evident) writing a paper for this setting
> was a different and challenging exercise.
> I hope the paper provides some insight into why
> Clojure is the way it is and the process and people
> behind its creation and development.
Re:Anonymous Recursive Functions in Racket
by skrishnamurthi on Monday September 08, 2025 @10:42AM
(#45168937)
Ah, I didn't know there was a HOPL paper! Some day I will have time to run a course reading HOPL papers. Some day I will have the time to read HOPL papers myself (-:. Thanks for the pointer.
recur: https://clojuredocs.org/clojure.core/recur
the recursion point to the values of the exprs. trampoline: https://clojuredocs.org/clojure.core/trampoline i.e. these emulate TCO, with similar stack consumption properties (they don't implement real TCO).(edit: formatting)