3 ms·
yes, codegen have better performance than reflect but I think text/template to generate code is not really good it hard to read and error-prone it is more li
by bigpigeon 9y ago
yes, codegen have better performance than reflect
but I think text/template to generate code is not really good
it hard to read and error-prone
it is more like a powerful c-macro
I think use go/ast to implement c++ likes template is other way
- tptacek 9y agoWhatever works! I just wrote the functions I wanted normally, tested them, then converted them to templates.