Just as stated in the title: Why is it possible to omit default values in overridden member functions of sub-types?
Is this normal or to be expected?
Yes, this is normal and to be expected.
Moreover, it is not allowed to override the default values. This does not compile:
interface Foo {
fun bar(parameter: Int = 1)
}
class Baz : Foo {
override fun bar(parameter: Int = 1) { // ERROR: An overriding function is not allowed to specify default values for its parameters
}
}
Technically the implementation with fixed default values is much simpler than any other implementation. For example Scala goes to a great extend to provide this capability, but the generated byte code is not a simple one.