The famous "Java Puzzlers" made it clear that there are quite a few cases when it’s rather difficult to answer the question "what does this code do?" (our intuition deceives us). In this talk we are going to rewrite some of the code snippets to Kotlin and discuss what can be fixed in a new JVM language, what cannot be fixed and whether it really matters =).
The famous "Java Puzzlers" book (as well as series of talks) revealed several cases when it's quite a challenge to guess correctly the behaviour of the code.
While some are JVM-related, most of those cases have roots in Java language and libraries design. For each puzzler it's interesting whether it could be fixed in "an ideal world" (without backward compatibility constraints).
In some ways a new JVM language provides an opportunity to study it. In this talk we are going to look at several traditional Java "puzzlers" and try to rewrite them to Kotlin.
Svetlana is working on Project Kotlin (kotlin.jetbrains.org) at JetBrains since 2011. From time to time she tries to encourage people with Kotlin at conferences. Before joining Kotlin she had a passion for the Scala programming language. She loves concepts and ideas, and skiing in the Alps as well.