3 ms·
OCaml[1] and Scala[2] have had this too. [1] https://batsov.com/articles/2024/01/16/learning-ocaml-verifying-tail-recursion-with-tailcall/ https://batsov.com/a
by nequo 2y ago
OCaml[1] and Scala[2] have had this too.
[1] https://batsov.com/articles/2024/01/16/learning-ocaml-verifying-tail-recursion-with-tailcall/ https://batsov.com/articles/2024/01/16/learning-ocaml-verify...
[2] https://www.scala-lang.org/api/current/scala/annotation/tailrec.html https://www.scala-lang.org/api/current/scala/annotation/tail...
- runevault 2y agoI was pretty sure OCaml had it but I'm less than a newbie with it (touched dune a little bit and built tiny apps but nothing real) so didn't want to bring up something I wasn't sure about. And Scala I haven't looked at in like a decade, but thinking about it I am not surprised it has similar protections. I feel like Clojure also had a keyword to recur as tail but probably been 12 years since I used that language so my memory could be completely faulty