Why not provide val for fun declaration?


#1

I’m new to Kotlin. Why does Kotlin not provide the val modifier for function parameter, like final in Java and const in C++?

fun method(val param: String) = …


#2

Function parameters are read-only inside the function in Kotlin, so there is no need to specify modifier as it is always val.