Cyclone has generic types, called datatypes, they are used in this manner:
datatype T {
Integer(int);
String(const char *@fat);
};
datatype T.Integer x = Integer(3);
datatype T.String y = String("hello, world");
void printT(datatype T@ a) {
switch (a) {
case &Integer(i): printf("%d",i); return;
case &String(s): printf("%s",s); return;
}
}
I'm not making a proposal to add it, merely something that would be useful to discuss.