https://kotlinlang.org logo
Title
k

kartikpatodi

07/02/2018, 3:25 PM
I thought C++ and C# introp was available with KN
a

Aregev2

07/02/2018, 3:40 PM
Only C at the moment, cpp has some fetures which are too complex to map in Kotlin. C#? No plans to that according to my knowledge
g

gildor

07/02/2018, 4:35 PM
C# is not native, it's closer to Java and has own virtual machine CLR
t

thymecypher

07/03/2018, 4:37 AM
Like Java, it's possible to compile it to machine code with caveats, do not recommend. But anyway... it's possible to do C and ObjC with minimal effort because they are "C compatible" - the term typically used escapes my mind. Compiled Swift might work with cinterop, but for C++ you'll probably need to make a wrapper, which is fairly simple. You just make functions that take a pointer as the first parameter which would be a pointer to the object, and you could create wrappers in Kotlin that hold a 'val ptr: Long'... tldr, cpp first class interop might not be worth the hassle, but I have a production app that uses C++ with Kotlin and Swift, so anything is possible with a little effort.
m

msink

07/03/2018, 12:43 PM
Well, for small C++ lib effort is little, for huge libs like Qt - it's not possible.