Recursive nominal types with limited structural types #232
Description
Structural types certainly make sharing tuple, array, and function type definitions simpler, whether they are necessary or not. We also need recursive types because they are so common in source languages. What if we supported recursive nominal types and some form of limited structural types that had negligible canonicalization overhead?
One possible limitation on structural types might be that they could only have nominal or primitive types as children.
AFAICT, this approach seems to have all the advantages of both nominal and equirecursive types. Tuples, arrays, and function types that are structural in source languages are typically not also recursive except indirectly through non-structural types like classes, so they could be lowered to structural types in this scheme.
For those who want nominal types in the first place, does this extension with limited structural types seem useful and acceptably simple?
For those who want structural types in the first place, are there important use cases that this idea still does not support without the central coordinating logic necessary with nominal types?