[RFC] Standardized Abstractions

Also Structural subtyping can be considered, where names doesn’t matter. A concrete type is a member of a structural category if it happens to have all the needed elements, no matter what it happens to be called.

Structural typing is very similar to duck typing from dynamic programming languages, except that type compatibility is determined at compile time rather than at run time. If you’ve used Go, you’ll recognize that Go interfaces are structural types.

Major benefit is You do not declare structural relationships ahead of time, instead it is done by checking if a given concrete type can fulfill the required interface.

Just my two cents :smile:

5 Likes