Comment Comment by winstonlee Been a while since I last used it but there is @tailrec in Scala. The compiler does enforce it and optimize the resulting bytecode. parent winstonlee 3 months ago