Myvideo

Guest

Login

Kotlin: Decompiled How its features are represented on the JVM

Uploaded By: Myvideo
6 views
0
0 votes
0

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 byte-code 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 Top-Level 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 👋

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later