u/loehnertzin r/Kotlin • Recommends
Kotlin: Decompiled – How its features are represented on the JVM
841 subscribers • 1 video on Hallway
Intermediate. Assumes working knowledge.
2.9K views4 years ago1 recommendation
Programming languagesSystems programmingKotlinCompilers and interpretersPerformance and optimization
An analysis of how Kotlin language features like top-level functions and inline keywords are compiled and represented in JVM bytecode.
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: github.com/The-Self-Taught-Software-Engineer/kotlin-decompil… Timestamps: Introduction Top-Level Function Inline Keyword Local Function Operator Overloading Named Argument Iterating over Range Sealed Interface Reified Keyword 👋 Keep in touch 👋 💬 Discord: discord.gg/YZ9tUCu8bG 🐦 Twitter: twitter.com/tstse_videos 🔔. Subscribe: youtube.com/channel/UC5T13H7ySovYvSG6IZlqdzA?sub_confirmatio… If you have any suggestions for content or feedback please leave them in the comments. In case you enjoyed this video, make sure to leave like, subscribe and share it with anyone you could consider interested!u/loehnertzin r/Kotlin • Recommends