3 ms·
I personally like this solution. I don't know why there's so much negative opinions on this. Yes, it doesn't solve the problem of generics as a language constru
by zserge 12y ago
I personally like this solution. I don't know why there's so much negative opinions on this. Yes, it doesn't solve the problem of generics as a language construct and it doesn't provide macros as a language construct. But it gives a lot of power for many other real-life applications like embeddeding/processing some content or generating type-safe bindings/wrappers/parsers/collections/...
It's an extension of a build system, not a language. It helps to specify build process details right in the source files that either depend on it, or provide necessary details for it. This approach worked for CGo, it worked for +build flags, so I don't see why it will not fit in this particular case.
One thing I worry is how to get the processor app during the build process. E.g. if bindata is used to embed a file - how will "github.com/jteeuwen/go-bindata" be installed?