3 ms·
A quick look shows that 'go generate' simply allows filtering a file through an external tool. This is a powerful feature but has great setup overhead. Somethin
by gpderetta 10y ago
A quick look shows that 'go generate' simply allows filtering a file through an external tool. This is a powerful feature but has great setup overhead. Something slightly more integrated with the language (as a distinct compiler pass but still part of the language), with the capability of defining macros inline (and being exportable), and AST based instead of string based would be better.
- pjmlp 10y agoYou can combine it with the AST and template packages, getting half-way there. In any case, I agree with you, but given the Go's culture I guess that is the closer we will ever get to compile time code generation.