-
Notifications
You must be signed in to change notification settings - Fork 0
Feature proposal: Reflection #104
Open
Description
Proposal Id: reflection
This proposal introduces reflection to Quickfall. Reflection will be used at compile time to obtain information about types.
Furthermore, the proposal introduces the following compile time operations:
types<bound or trait>: Gets every type with the bound or traittypes<>: Gets every type registered in the current global scopetraits<type>: Gets the traits of the given typebounds<type>: Gets the bounds of the given typemethods<type>: Gets every method of the given type if applicable, else errorfields<type>: Gets every field of the given type if applicable else error.reflectfor: A new kind of for loop made to iterate trough reflection dataname<object>: Makes a static string of the reflection object's name
Every single macro will run at compile time and no actual type info will be usable at runtime besides the object names. This is to guarantee a clean Reflection and healthy performance whilst using it.