Re:Show HN: ffjson: faster json serialization in Go
by hannibalhorn on Monday March 31, 2014 @11:56AM
(#7502234)
The implementation of this is pretty interesting, in that it generates code that imports your code, compiles it, and then uses reflection to generate the serialization code. And in the end, that worked out better for the author than using the AST.
[ Parent
| on HN ]
Re:Show HN: ffjson: faster json serialization in Go
by lucian1900 on Monday March 31, 2014 @12:09PM
(#7502316)
If anything, that would be an indication that the tooling is nowhere near good enough. Any reflection should be doable entirely with data the compiler has anyway.
Re:Show HN: ffjson: faster json serialization in Go
by timtadh on Monday March 31, 2014 @12:28PM
(#7502425)
Actually there is a tool for this. I think the author was simply un-aware of it. It is called oracle* and is able to answer this typing question and many more.
*: https://code.google.com/p/go/source/browse/cmd/oracle/main.g...