I know this is a nit pick and it's ok if stays as is, I just want to point it out because I thought about it and it is a small inconsistency
The field to get the name of a type and the name of a member is nameof
struct Baz
{
int x;
Foo* z;
}
String x = Baz.membersof[1].nameof; // "z"
String i = int.nameof; // "int"
But the field to get the name of a parameter is name
alias TestFunc = fn int(int x, double f);
String s = TestFunc.paramsof[1].name; // "f"
Imo, they should share the same name (nameof) because they represent the same concept and the same operation.
I know this is a nit pick and it's ok if stays as is, I just want to point it out because I thought about it and it is a small inconsistency
The field to get the name of a type and the name of a member is
nameofBut the field to get the name of a parameter is
nameImo, they should share the same name (
nameof) because they represent the same concept and the same operation.