-
Notifications
You must be signed in to change notification settings - Fork 167
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
Implement generics #154
Comments
This should now be possible with |
This particular case can be. We still need generics/templates. The overload in a sense is a subset of generics: you provide specific implementations ahead of time. The templates do not provide specific implementations, the compiler instantiates them. |
Was this picked up by any person? Or is it still open for contribution? |
Yes, it's still open. We have quite solid generics in libasr thanks to LFortran, and we should hook them into LPython. |
Hi, |
They are implemented in LFortran, you can start here: https://docs.lfortran.org/en/asr/generics/. |
We need to allow writing generic functions (templates) and template constraints.
One idea that we can explore is to also support something like: #152 (comment):
The text was updated successfully, but these errors were encountered: