Welcome Address & Intro
Greg Fawson, CEO
Refactoring Legacy Code With Kotlin
Ash Davies, Lead Android Engineer
Legacy code can be quite the challenge to manage, often resulting from untested scenarios, quick fixes, or less than successful initiatives. With few developers wanting to deal with it, it can end up with little remaining knowledge of its inner workings.
We can take many learnings from Michael Feathers book on “Working Effectively with Legacy Code”, but we can also use Kotlin migration as an effective tool to leverage the management, reduction, and removal of legacy code in our applications.
In this session, you’ll learn how to get started with Kotlin in your projects, tips and tricks on how to preserve your version control history, some pitfalls when migrating from Java, and what new technologies you can make use of in your journey with Kotlin.
Kotlin scope and extension functions: when to use and how to improve not harm the readability
Dimitry Sitnikov, Android Engineer
Practical guidelines when to use and when to not use scope functions and extension functions to keep the code readable and avoid subtle errors.
Examples of functions that can reduce boilerplate and make tests cleaner.
- how to figure out whether you need an extension function or a "standard" function
- how to figure out whether you need a scope function or a "standard" expression
- how to make the code cleaner with extension and reified functions
Dissecting the Inline Keyword in Kotlin
Suraj Shah, Software Engineer
A deep-dive into the internal workings of the inline keyword in Kotlin
While being mostly under-recognized, this little optimization forms the backbone for a lot of features and APIs in Kotlin, features which are directly dependent on the lambda infrastructure.
And it doesn't stop there, the inline keyword opens up the ecosystem to have capabilities for type reification, which still isn't possible when writing Java.
Java 8 introduced the concept of lambdas, while this was done at the language level, using bytecode instructions introduced in Java 7, Kotlin, tries to make this lambda functionality available for applications targeting Java 6. Kotlin does this by creating Classes of functions are lambdas. This can lead to performance problems as a good number of instances for the classes might get created.
This talk dives into:
* How does Kotlin achieve it? What changes does it do to make this compatibility happen?
* How does inlining optimize a lambda?
* How this little optimization makes it possible to have type reification?
* How it doesn't stop there and introduces the concept of Inline classes, which enable Kotlin to have unsigned integers.
* How all of this is done, by just adding one keyword support in Kotlin.