logoalt Hacker News

gpmyesterday at 9:13 PM1 replyview on HN

Scala, ocaml, racket, clojure, zig.

For recursion only kotlin.

(For most of these only with syntax specifying it)


Replies

lioeterstoday at 1:19 PM

How interesting. I'd seen LISP(y) implementations like Scheme guarantee tail-call since recursion is a very common technique in that language family. But I didn't know Zig supported it.

https://ziglang.org/documentation/master/#call

They have an @call built-in that guarantees: always/never tail, as well as always/never inline. That's neat, I can see how that would be useful in various situations.