Kotlin KODERS 2021 - Lies told by the Kotlin compiler by Garth Gilmour

Описание к видео Kotlin KODERS 2021 - Lies told by the Kotlin compiler by Garth Gilmour

In order to interoperate with the JVM, and to implement advanced features, the Kotlin Compiler needs to take some liberties on your behalf. It must translate Kotlin specific constructs into concepts the VM can understand, which requires that it reinterpret your code in unexpected ways. This applies to both simple things like symbol names and complex abstractions like suspending and composable functions.

In this talk Garth Gilmour will lift the lid on some of the tricks the Kotlin compiler (with plug-ins) uses to keep your coding life simple, plus show when and how you can influence its output.

- Code example can be found here: https://bitbucket.org/instilco/kotlin...
- Slides are available here: https://drive.google.com/file/d/1KDc5...

0:00 Introduction
1:33 introducing this talk why do we need lies?
4:27 introducing javap the java bytecode decompiler
5:06 Three different levels of deception lies, damned lies and jetpack compose
5:30 free functions
7:51 nested functions - extended
10:18 extension methods
11:29 destructuring
12:46 object declarations
14:08 companion objects
16:21 lambdas with receivers
23:42 understanding suspending functions
25:09 how do suspending functions work? via continuations...
27:07 suspending functions do not suspend!!! they return and are re-invoked
29:00 working with desktop compose creating a simple calculator
30:42 decompiling the calculator

Комментарии

Информация по комментариям в разработке