Kipper icon indicating copy to clipboard operation
Kipper copied to clipboard

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

Open Luna-Klatzer opened this issue 1 year ago • 0 comments

Is there an existing proposal for this?

  • [X] I have searched the existing issues

This feature does not exist in the latest version

  • [X] 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 avatar Jul 27 '23 12:07 Luna-Klatzer