News for hackers. Stuff that matters.
Re:Moving Beyond Type Systems by sparkie on Saturday June 01, 2024 @04:13PM (#40548730)
Yeah, we can consider `string`, `int` to both be subtypes of `string | int`, and `string & int` to be a subtype of both `string`, `int`.

There are some problems with doing so though, such as inferring the types, but they can be mostly mitigated by giving types a polarity, as Dolan introduced in Algebraic Subtyping[1]

[1]:https://www.cs.tufts.edu/~nr/cs257/archive/stephen-dolan/the...

There are no comments on this comment yet.