This message was deleted.
# getting-started
s
This message was deleted.
h
You can always pass null at Java side, because Java (and the JVM) has no nullable types (yet).
m
Extensions functions are compiled to static functions that take a
Foo
as an argument on the JVM. So it has the same signature in Java as the first declaration of
f
.
h
Kind of, the signature depends on the Kotlin filename
m
But the extension function and the top level function depend on the name of the Kotlin filename. I'm pretty sure they produce same function. The name of the parameter will be different. But there might be some other changes that I'm not thinking about.
c
> Extensions functions are compiled to static functions that take a
Foo
as an argument on the JVM. Tiny nitpick but that's technically incorrect, the functions are static because they're top-level, not because they're extensions; non-top-level extensions are not compiled to static functions
I'm pretty sure they produce same function.
As seen from Java, they are completely identical, yeah. The parameter name is different but the parameter name is not exposed to callers in Java so it doesn't matter.