Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trait implementation specialization and coherence (intermediate/advanced) #16

Open
caspark opened this issue Aug 14, 2016 · 0 comments
Open
Labels

Comments

@caspark
Copy link
Contributor

caspark commented Aug 14, 2016

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant