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

Support for Abstracts #56

Open
VincentRPS opened this issue Nov 14, 2024 · 1 comment
Open

Support for Abstracts #56

VincentRPS opened this issue Nov 14, 2024 · 1 comment
Milestone

Comments

@VincentRPS
Copy link
Contributor

Add support for Abstracts, shared function signatures with different functionality
based on struct or enum type, similar to Rust's traits.

NOTE: Generics

While Generics aren't explicitly needed for implementing Abstracts, they are very
useful for users in making them and in many cases traits can't be made without
generics.

NOTE: Special Support

The compiler due to backend limitations is expected to provide special support for the
following:

  • Add (Blocked by Generics) (Usage of +)
  • Sub (Blocked by Generics) (Usage of -)
  • Div (Blocked by Generics) (Usage of /)
  • Mul (Blocked by Generics) (Usage of *)
  • other mathematical symbols (probably also blocked by Generics)
  • Eq (Blocked by Generics) (Usage of ==)
@elenakrittik
Copy link
Contributor

Just to clarify: the functionality ("purpose", in other words) of abstract functions is the same; it's the implementation that differs

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

No branches or pull requests

2 participants