I have an abstraction which amounts to Pair<Int...
# announcements
j
I have an abstraction which amounts to Pair<Int,(Int)->Any?> this gets my needs met, however, there appears to be a JVM Integer boxing detour when the abstraction starts to nest; so the questions i have: 1. is this due to type erasure and/or generics forcing an object base class? 2. does th llvm compilation do a better job with LTO to eliminate boxing?
f
1. Yes, both 2. Boxing is a JVM concept and LLVM compiles to machine code, hence, there's no boxing.
j
im using a few jvm libs that aren't in K/N; is there any jvm annotation signal or hack that might avoid needing to make an ungeneric version of same?
f
Not that I'm aware of. Monomorphization would be required, which the Kotlin compiler could do, but it would hurt Java interop for Java users who want to consume Kotlin.