June 2018
Intermediate to advanced
316 pages
6h 34m
English
Although Koltin is a modern programming language that has many features of functional programming, you should remember that it compiles to the same bytecode as Java. That's why it's good practice to use the Kotlin Bytecode inspector to check how your code works under the hood. When you work with higher-order functions, in most cases, you should use the inline modifier. Let's inspect the Archive.kt file.
When we use the inline modifier, we can see that the lambda code that we pass to the archive function is used directly in place of invocation:
public static final void main(@NotNull String[] args) { Intrinsics.checkParameterIsNotNull(args, "args"); new File("input.txt"); throw (Throwable)(new NotImplementedError((String)
Read now
Unlock full access