Add Union/Intersection types
Union and intersection types are helpful utilities for composing types. Unions are particularly helpful for addressing simple variations in allowed arguments as well as better type inference. Intersections are less common but can be useful for higher level abstractions and combining interfaces.
- [ ] Implement union types
- [ ] Implement intersection types
- [ ] Address unification via subtypes or unions
Is this intended for the language or the meta-language? In other-words, are these concepts for the compiler optimizations or for end-users?
End-users. Union types are incredibly useful for specifying alternatives accurately; intersection types are less common but show up from time to time with multiple inheritance (they're needed internally as well for unification).