• Top
  • New

Swift/Java interoperability tools and libraries

by timsneath on 9/26/2024, 6:22:57 PM with 21 comments
  • by microflash on 9/26/2024, 6:36:14 PM

    This sounds useful. Here are links that actually load on my phone.

    - https://github.com/swiftlang/swift-java

    - https://forums.swift.org/t/improving-swift-support-and-inter...

  • by glhaynes on 9/26/2024, 7:32:43 PM

    Cool! One thing Swift is really (maybe uniquely?) strong at is C/C++/Objective-C interop, including mixing "legacy" code with Swift and even replacing it file-by-file with minimal ceremony. Looks like this is aiming to bring a similar level of interop to Swift<->Java.

  • by aaronbrethorst on 9/26/2024, 6:52:25 PM

    Plus ça change: https://developer.apple.com/library/archive/documentation/Co...

  • by liuliu on 9/26/2024, 6:58:00 PM

    PythonKit (from Swift) is underrated but immensely useful in certain scenarios (i.e.: https://engineering.drawthings.ai/from-iphone-ipad-to-mac-en...).

    Hopefully JavaKit can find their usefulness too!

  • by koito17 on 9/26/2024, 8:21:32 PM

    This gives me flashbacks to the Objective-C / Java bridge [1] from over a decade ago. It makes me wonder how they are dealing with memory management when Java objects are being used from Swift (or Swift objects from Java). This was one (of various) issues that made using the Cocoa Java bridge a bit unpleasant.

    I guess Swift has a lot less run-time dynamism going on, so it may not be too hard to translate Swift semantics to Java. Definitely interested to see how this unfolds over the next year.

    [1] https://developer.apple.com/library/archive/documentation/Co...

  • by wiseowise on 9/26/2024, 7:25:47 PM

    Will be wildly ironic if Apple pulls uno reverse card and eats Kotlin on Android instead of the other way around.

  • by renewedrebecca on 9/26/2024, 8:51:16 PM

    Oh, well that’s cool!