2 ms·
Code generation tools like go gen are good for those situations where you have boilerplate code based on the structure of your type, like serializers, compariso
by ufo 12y ago
Code generation tools like go gen are good for those situations where you have boilerplate code based on the structure of your type, like serializers, comparison functions, etc. On the other hand, these tools do not help you create abstractions or decoupled interfaces.
An analogy would be the "deriving" system in Haskell. It doesn't replace the generics system, it just complements it.