Kotlin: Decompiled How its features are represented on the JVM
Have you ever wondered how the Kotlin compiler pulls off all those nice features when having the JVM as the target platform Some of Kotlin s features have no clear equivalent in Java, JVM bytecode which means that the compiler has to do a lot of heavy lifting to enable those nice features. For this video, I analyzed almost 40 of Kotlin s features and language constructs to see what they end up looking like once run through the Kotlin compiler. For this to work, I first compiled a small example for each, to then decompile the resulting bytecode to Java again for a readable but close representation of what happens behind the scenes. You can find all the code snippets in this public repository: Timestamps: 00:00:00 Introduction 00:02:35 TopLevel Function 00:03:39 Inline Keyword 00:04:34 Local Function 00:05:07 Operator Overloading 00:05:40 Named Argument 00:06:23 Iterating over Range 00:06:58 Sealed Interface 00:07:45 Reified Keyword
|
|