https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
n

nestserau

12/19/2018, 11:10 AM
Is there a plan to make Kotlin generics available from Swift? It’s a shame I get untyped definitions in Swift, while Kotlin and Swift both support generics. I’m talking in the context of using an iOS framework produced from a MPP.
2
g

gildor

12/19/2018, 12:40 PM
Kotlin and Swift generics are quite different, so it's not so easy. But still hope to see some support in the future
s

Sam

12/19/2018, 3:30 PM
Apple has some non-public ObjC syntax for better support for generics that would allow Kotlin to expose better generics support in its interfaces. Officially they can only be turned on for collection types but unofficially one can do almost the same amount of things with generics in ObjC as one can in Kotlin.
g

gildor

12/19/2018, 11:43 PM
Good to hear. Curious about K/N team plans about it
c

coletz

12/20/2018, 1:49 PM
hey @Sam do you know where I can find more info about that? Afaik generics are just not supported by objc, and as Andrey said swift and kotlin/java generics are quite different
s

Sam

12/20/2018, 5:46 PM
2 Views