https://kotlinlang.org logo
a

alex.hart

01/16/2018, 2:09 PM
Furthermore on interfaces, has there been discussion around finalization of default implementations?
a

Andreas Sinz

01/16/2018, 3:09 PM
Like non-overridable default implementations?
a

alex.hart

01/17/2018, 12:15 PM
Yes, exactly. This’d give us what are essentially mix-ins and better observe the OCP. You can get there partially through class delegation but it feels awkward.
a

Andreas Sinz

01/17/2018, 12:30 PM
but then we get very close to an
abstract class
(minus internal state) and back at the multiple-inheritance problems
a

alex.hart

01/17/2018, 5:07 PM
interfaces have already solved the problem of “which method gets called” with
super<T>
We have default methods, but we can’t specify whether those methods are virtual. There must be a limitation under the hood for this.
3 Views