Type inference for function argument with default ...
# language-proposals
f
Type inference for function argument with default value.
Copy code
// Inferred as x: String, y: Int = 2, z : String = "hello"
fun foo(x : String, y = 2, z = "hello"){
}
5
g
It discussed many times. There is no simple way to implement this. If you interested, check Kotlin Forum, you may find explanations from someone from Kotlin Team
l
could anyone provide a link? i wasn't able to find this, and this would be a verryyy cool feature to have
h
They largely dismiss it due to expensiveness, but isn't that all in compilation? Is time to compile that big of a concern?
👌 1
f
Is time to compile that big of a concern?
Most definitely. Have you tried programming in large kotlin/native project before?
h
nope, but thanks. since i don't have any experience there, I readily accept the opinions of others that have