News for hackers. Stuff that matters.
Re:Will It Optimize? (2010) by lmm on Saturday October 25, 2014 @03:57PM (#8509222)
Scala handles this in quite a nice way: the compiler will optimize tail-recursive functions without needing any special effort, but if you want to ensure a particular function is tail-recursive as a matter of correctness, you annotate it with @tailrec and the compiler will error out if it can't optimize that function.

There are no comments on this comment yet.