Tailrec Through The Ages Until Kotlin
Hi there! In this following video I am telling the story of one of the most debated keyword debated in Kotlin these days... At least it should and to be honest, I'm not sure if everyone understands what it really is. Therefore I wanted to investigate more about this enigmatic keyword and how it came to appear in Kotlin. Long story very very short, tailrec means tail recursive and it means that the compiler will potentially be able to transform this function into a known better algorithm allowing use to make functions in Kotlin that remain "pure". "Pure" is a bizarre word created in the Kotlin community to define Kotlin a language that doesn't have any side effects at all and doesn't use any mutability. But tailrec in Kotlin does transform seemingly immutable and side-effects free code into something else in the bytecode. I try in the video to have a philosophical discussion about the topic and not to get into any conclusion. And the question remains if i...
Comments
Post a Comment