by pjmlp · 3y ago · 0 comments
In fact it is mostly the opposite, all the Kotlin concepts that don't exist in Java (the language), need additional bytecodes to fake their semantics on top of JVM bytecodes optimized for Java semantics.
Like functions, lazy initializations, delegation, or co-routines.
https://sites.google.com/a/athaydes.com/renato-athaydes/post...
Apparently the JVM can inline, then do null check elimination.
Do you mean, "javac can also implement them if it is modified to do so"? Because you are also making the case that Kotlin is syntax sugar on top of Java, when it is actually a bytecode-generating compiler in its own right, so I'm not sure how to understand this comment.
Anyone else has to generate boilercode to pretend the semantics expected by those bytecodes, was easily shown via javap tooling on .class files.