You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trait implementation specialization is a proposed and partially implemented technique for overriding part or all of an implementation of a trait with a specialized implementation for more specific types.
It's interesting because it enables some of the code reuse benefits typically ascribed to inheritance (I can see similarities to Java 8's default methods on interfaces approach as well as Scala's trait mixin + override keyword approach - perhaps comparing & contrasting to that or to C++ approaches would be good?), because it breaks parametricity somewhat, because it changes the coherence rules (restrictions around where & what implementations of a trait can be defined), and of course because it allows increased performance through specialized implementations.
If you've read this far and started opening up tabs to figure this stuff out (or already know the topic), please share your findings in the form of a talk!
The text was updated successfully, but these errors were encountered:
Trait implementation specialization is a proposed and partially implemented technique for overriding part or all of an implementation of a trait with a specialized implementation for more specific types.
It's interesting because it enables some of the code reuse benefits typically ascribed to inheritance (I can see similarities to Java 8's default methods on interfaces approach as well as Scala's trait mixin +
override
keyword approach - perhaps comparing & contrasting to that or to C++ approaches would be good?), because it breaks parametricity somewhat, because it changes the coherence rules (restrictions around where & what implementations of a trait can be defined), and of course because it allows increased performance through specialized implementations.If you've read this far and started opening up tabs to figure this stuff out (or already know the topic), please share your findings in the form of a talk!
The text was updated successfully, but these errors were encountered: