3 ms·
What's interesting about this design is that with one minor relaxation, the "type list in an interface" could become one of the other big things that Go is miss
by gwd 6y ago
What's interesting about this design is that with one minor relaxation, the "type list in an interface" could become one of the other big things that Go is missing; namely, sum types:
> Interface types with type lists may only be used as constraints on type parameters. They may not be used as ordinary interface types. ...This restriction may be lifted in future language versions. An interface type with a type list may be useful as a form of sum type, albeit one that can have the value nil.