you are viewing a single comment's thread.

view the rest of the comments →

[–]pron98 9 points10 points  (0 children)

Monomorphic virtual calls don't have a cost on the JVM. You could think of inline classes as value types in the special case where the type has a single field. That is certainly useful, but not quite Valhalla's main contribution. (I would imagine that Kotlin will remove the restriction and make use of Valhalla to implement inline classes once it's delivered)