3 ms·
Fixing the lack of generics is not the intent of supporting a standard way to do code generation. The intent is to allow for things like generating code from p
by NateDad 11y ago
Fixing the lack of generics is not the intent of supporting a standard way to do code generation. The intent is to allow for things like generating code from protobuf specs and yacc. In fact, there was even debate against adding go:generate because they were afraid people would use it to get something like generics. To say it is for generics is to grossly mischaracterize the feature.
- copsarebastards 11y agoGiven that this is the only way Go provides to gain access to generic-like behavior, you shouldn't be surprised when people use it that way, and the intent of the team is quite irrelevant.