This is how C++ compilers used to work before templates came into the picture.
For example Borland's BIDS 1.0 in Borland C++ for MS-DOS, it was based on the C pre-processor, as you would define a set of macros and then include the desired type, something like
#define LIST_T int
#include <bids/list.h>
#define LIST_T float
#include <bids/list.h>
and so on, however when BIDS 2.0 was released, there was already primitive support for the ongoing ISO discussions and it was rewritten to use templates.To be fair, Go generics seem to be finally on their way to be adopted into the language.
We have a lot of codegen in our codebase right now and I can't wait for the day that generics are finally added.
As heavy critic, but also fan, I have been following up on it, and the last update on the document is from September, so I am positive they might make it, it just appears the proper implementation still has some engineering challenges.
https://go.googlesource.com/proposal/+/refs/heads/master/des...
Well, and there is also kinda sorta support foir generics on top of it:
https://github.com/vasilevp/aboriginal
There is no engineering challenge that can't be overcome by ingenious thought!
https://blog.golang.org/generate
Now I'm wondering if you joke was not actually a joke.