hello everyone, when to support the interoperatabi...
# compiler
a
hello everyone, when to support the interoperatability of C++ and Kotlin?
c
tl;dr it's impossible in full generality unless you are also a C++ compiler
a
I am reviewing chromium source code. there, I see that java call c++ thing.
c
It’s possible on Java with JNI (Java Native Interface) https://docs.oracle.com/javase/8/docs/technotes/guides/jni/
e
you have to wrap every C++ call in JNI manually, you can't call arbitrary C++ from Java directly. you can do the same for Kotlin/Native
in Java's case, the C++ JNI API is just a thin wrapper around the C JNI API anyway; the JVM uses the C ABI to interact with everything
a
I don't like JAVA. I hope Kotlin directly can call C++. When will Kotlin have this feature roadmap?
e
I expect it will not ever. use C (or C++
extern "C"
) wrappers, like FFI works for practically every other non-C++ language in existence
a
@ephemient please show me codes in Kotlin like you says. by the way, who (people) design Kotlin language?
or say who is Kotlin language's father?
can Kotlin do "pass by reference" like C++?