News for hackers. Stuff that matters.
Re:Toyorm – ORM for Go by bigpigeon on Tuesday April 03, 2018 @03:59AM (#16742685)
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

Re:Toyorm – ORM for Go by tptacek on Tuesday April 03, 2018 @11:44AM (#16745771)
Whatever works! I just wrote the functions I wanted normally, tested them, then converted them to templates.