-
Notifications
You must be signed in to change notification settings - Fork 12
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
Spec: dynamic dispatch #23
Comments
Does it make sense to have a Main issue I can see is that iirc this requires actual type inference |
So, my (very brief and compressed) thoughts on this: Typeclasses do static dispatch. In a sense that's "all you need". But unless you want every type and function to be generic (with the associated compilation cost), you usually want a way to do dynamic dispatch. There's two ways to do this, broadly:
I have some thoughts (which I hope I wrote down somewhere) on how to do this while preserving the soundness of the linear type system. It is possible. I just haven't worked on implementing this yet, because I think having a usable/practical |
Functional approaches will always get my vote, so Closures over OOP 😆 But yeah, this doesn't seem to be a priority right now 🙂 |
Closures, or some light OOP.
The text was updated successfully, but these errors were encountered: