Optimization question: could we have an optimizati...
# language-proposals
d
Optimization question: could we have an optimization for inline functions that eliminates boxed types where possible? For example,
inline fun <T : Comparable<T>> max(a: T, b: T) = if (a > b) a else b
would only use the primitive type at a call site such as
max(1.0, 5.0)
? I keep discovering the other existing optimizations (big thanks from Android land!) and I’m curious what else is possible simple smile