Closed ghost closed 6 years ago
It's used mostly in vm.go, but also in option.go and util.go. In NewT() in util.go, I use it to interact with objects of arbitrary type (more or less; they're assumed to be structs, at least). I'm not sure how to get rid of reflect in that context, even with code generation.
Why do you want to get rid of it?
To be honest it was more instinctive reasons. Just been there in complex reflection code and it can sometimes ease complexity to just codegen.
I need to play with and look at the functions you mentioned I think first.
Will close this as I think it's not worth optimising it as you seem cool with the reflection.
Where is it used ? Can likely get rid of it using codegen.