Re:Four days of Go
by amaranth on Wednesday April 22, 2015 @07:27PM
(#9424214)
This is already a thing, no? https://blog.golang.org/generate
[ Parent
| on HN ]
Re:Four days of Go
by PopsiclePete on Thursday April 23, 2015 @11:56AM
(#9427570)
Almost. So close. But no cigar.
Go generate is for the package creator, not the package consumer. So you, as a package creator, may create a "generic" red-black tree, but unless you pre-generate all my use cases for all my data types, I can't pull your package and then use go generate to create Tree<int> and Tree<string> if that makes sense.