Looking at WWDC .. how about that swift <-> ...
# multiplatform
u
Looking at WWDC .. how about that swift <-> cpp interop. Can we hijack that to get generic interfaces (like Flow) ?
e
the wwdc videos going into detail about swift aren't available yet
u
yea I just saw the presentation, they're showing vector<t> ..okay now I'm thinking it might be a class so 😄
but looks promising
e
in the forums (https://forums.swift.org/t/report-swift-and-c-interoperability-project-progress-in-the-swift-5-8-time-frame/64941) they say
• Disabled support for instantiating C++ class templates from Swift, as the existing implementation is incompatible with Swift's type system. Class templates specializations that are already instantiated in the imported C++ code can still be used in Swift. For example, you can use a type like
VecInt
in Swift, if you have a typealias like this one in the C++ header:
using VecInt = std::vector<int>;
.
regardless, I don't think that matters for Kotlin's generics since those aren't translated to C++ templates and aren't specialized
u
so no Flow<T> for me? 😞
e
not unless Swift adds another way to do interop or Swift's own object protocol is documented well enough for Kotlin to implement and somebody does the work