Currently, the typing system has multiple stages of "data loss". These losses happen since we change the type struct used in every stage of AstoIR and the AST.
Data loss includes:
- Loss of field names
- Array states
A new typing system must be made to ensure and allow:
- Every type uses the same struct, has the same information as the higher IR layer
- Value transmutation everywhere (instead of just on constants, variable references or function calls)
- Variable casting on pointers for example
- Type inferrence on variables
These changes will allow for the following features:
- Pointer types
- Ability to use size specifiers on structs
- Ability to use type generics on structs
- Bounds
- VSCode extension typing information
Currently, the typing system has multiple stages of "data loss". These losses happen since we change the type struct used in every stage of AstoIR and the AST.
Data loss includes:
A new typing system must be made to ensure and allow:
These changes will allow for the following features: