3 ms·
I first heard about this feature in OCaml. I got the name subtype or pattern type from this thread: https://internals.rust-lang.org/t/thoughts-on-pattern-types
by celeritascelery 4y ago
I first heard about this feature in OCaml. I got the name subtype or pattern type from this thread:
https://internals.rust-lang.org/t/thoughts-on-pattern-types-and-subtyping/17675 https://internals.rust-lang.org/t/thoughts-on-pattern-types-...
- karmakaze 4y agoThanks for the reference. I can see how values of type A could be considered as a subset of values of type A|B, but I think the 'any value of type A' subset of type A|B is more related to types and less about restricting the range/set of values for a type.