Hacker News new | ask | show | jobs
by frou_dh 1469 days ago
I thought the @tailcall annotation in OCaml was cool. It's not essential to use it to receive the optimisation, but rather it's a way to tell the compiler "I need this call to be optimised, so let me know if you can't do it".
1 comments

Nice! Scala has @tailrec but I think it only checks that a function’s calls to itself are tail calls.