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

[Feature] Implement basic generic type system for built-in types #494

Open
2 of 4 tasks
Luna-Klatzer opened this issue Jul 27, 2023 · 0 comments
Open
2 of 4 tasks
Assignees
Labels
feature New feature or enhancement
Milestone

Comments

@Luna-Klatzer
Copy link
Member

Is there an existing proposal for this?

  • I have searched the existing issues

This feature does not exist in the latest version

  • I am using the latest version

Proposal

As types such as Array<T> or Func<T, R> are planned, there needs to be an internal system for managing such generic types, where the compiler can store the information about the generics.

Although every generic built-in type will likely have to implement its own specific type checking, for example, the meaning of the generic parameters for built-in arrays is different from functions.

This means this proposal only targets the implementation of generic type support for the compiler in the form of recognising it syntactically and generating basic AST metadata, but not yet implementing any types or type checking itself.

Exact behaviour / changes you want

  • Finish implementation of internal AST class GenericTypeSpecifierExpression and its Antlr4 parser rule.
  • Implement wrappers for Kipper types (both primitive and generic), which will be required to properly store the metadata of such types. (This also will be required for object types in the future)
@Luna-Klatzer Luna-Klatzer added the feature New feature or enhancement label Jul 27, 2023
@Luna-Klatzer Luna-Klatzer added this to the v0.11.0 milestone Jul 27, 2023
@Luna-Klatzer Luna-Klatzer self-assigned this Jul 27, 2023
@Luna-Klatzer Luna-Klatzer changed the title [Feature] Implement basic generic parameter system for built-in types [Feature] Implement basic generic type system for built-in types Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement
Projects
Development

No branches or pull requests

1 participant