News for hackers. Stuff that matters.
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.
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...

Re:Show HN: ffjson: faster json serialization in Go by hierro on Monday March 31, 2014 @01:02PM (#7502684)
The tooling is excellent, but the author wasn't aware of it. In fact, the stdlib and the go.types repository provide almost anything required to write a front-end for a Go compiler.