guys, tail recursion is a so tasty optimization. Why it’s not turned on by default in kotlin? Why compiler can’t itself to recognize all cases for tail recursions in our code, and do appropirate stuff? Why do we need manually tolk to compiler via special keyword? (like “tailrec”).
Tail recursion seems to be an ordinary optimization, like constant folding… and kotlin (and other langs) have no special keywords to turn constant folding optmiziations on!