Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design Proposal - Kotlin #420

Merged
merged 2 commits into from
Sep 8, 2022
Merged

Design Proposal - Kotlin #420

merged 2 commits into from
Sep 8, 2022

Conversation

birkskyum
Copy link
Member

@birkskyum birkskyum commented Sep 2, 2022

See proposal here

@lseelenbinder
Copy link
Member

I would support this transition. Kotlin is much nicer to use than otherwise.

My only request would be to ensure bytecode compatibility for older versions, which is likely a few settings we will already need to adjust.

@birkskyum
Copy link
Member Author

bytecode compatibility

Absolutely. My understanding is that the bytecode won't be identical, but it should be possible to make it compatible.

@birkskyum
Copy link
Member Author

@wipfli , just putting your comment here to collect feedback in one place.

Thanks @birkskyum. I think Kotlin is the right language for Android. Let's wait with this pull request until we decided on #420.

@nvanfleet
Copy link

This is interesting, I wonder if we should consider migrating the iOS side to Swift?

@birkskyum
Copy link
Member Author

birkskyum commented Sep 6, 2022

@nvanfleet , if you investigate the Swift topic, and find that it's likely advantageous and have an idea about how we can do it, feel to make a design proposal to get some feedback. It's probably a good idea to cover possible changes in build size, the options for incremental adoption with bridge-headers and [Project]-swift.h, but it would be great to have a proposal to consider. Two sidenotes:

@birkskyum birkskyum merged commit 3657ca5 into main Sep 8, 2022
@birkskyum birkskyum deleted the design-proposal-kotlin branch September 8, 2022 03:20
@birkskyum birkskyum mentioned this pull request Sep 8, 2022
@atierian
Copy link
Contributor

atierian commented Sep 9, 2022

I'm also in support of this, and would like to see a similar move on the Darwin side to Swift. I'm curious about how this would work technically though. AFAIK Kotlin doesn't have direct interoperability with C++ (please correct me if I'm wrong). That would mean that it would have to through JNI(?) or we'd have to make an ObjC or C wrapper around the C++ code for Kotlin to consume? Or does the Android SDK expose Kotlin APIs that would cover our needs?

There are similar limitations on the Darwin side as well. However Swift <-> C++ interop is actively being designed and implementing by a Swift language workgroup I'm on. Here's the current status. This would be a non-issue on the Darwin side if we went to Metal, but that's a larger conversation and I don't want to hijack your proposal here 😄.

@birkskyum
Copy link
Member Author

birkskyum commented Sep 9, 2022

@atierian , it seems like there's a lot of interest in swift, so could you maybe make a PR with design proposal for us to discuss?

Regarding the C++ interop, we're going to tidy up the C++ core so we can make bindings to a range of targets easier, probably with SWIG or similar. I imagine that will also be the best approach for Kotlin.

@atierian
Copy link
Contributor

atierian commented Sep 9, 2022

Yea, I'll write up a design proposal on it.
@nvanfleet happy to collaborate on it if you're interested.

@nvanfleet
Copy link

Yea, I'll write up a design proposal on it.
@nvanfleet happy to collaborate on it if you're interested.

Sure I'd be happy to discuss it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants