talks icon indicating copy to clipboard operation
talks copied to clipboard

Trait implementation specialization and coherence (intermediate/advanced)

Open caspark opened this issue 8 years ago • 0 comments

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!

caspark avatar Aug 14 '16 03:08 caspark