What are the plans for Kotlin and multiplatform in...
# multiplatform
s
What are the plans for Kotlin and multiplatform inline classes, now that inline classes have been deprecated?
d
I don't know if they're deprecated, so much as renamed to 'value classes'. Given this, would there be any difference between single and multi platform use cases? Replace
inline class
with
value class
= happy days?
If it's not that simple I'm keen to know as well.
s
So it’s weird, because it has different behavior on the JVM if you don’t use
@JvmInline
. Maybe I misunderstood the blog post when it came out. I thought you could only achieve inlining on the JVM via the
value
keyword and
@JvmInline
. Maybe everything is working on multiplatform as an inline class just with the
value
keyword.
b
@JvmInline is here to future proof value classes for jvm. There's currently experimental support for inlining classes in jvm17 already, once that's stable, value classes without @JvmInline will reuse jvm native inlining capabilities instead of kotlin workarounds for it. Hope that clarifies things.
s
thanks for clearing that up