Re:The struggle with Rust
by rbehrends on Tuesday January 24, 2017 @02:39PM
(#13474727)
The point of polymorphic variants is that the entire type doesn't have to be fully defined in one place; you can have partial definitions in a module and those definitions can even overlap. You can have (say) [ `Int of int | `String of string ] in one module and [ `String of string | `Char of char ] in another, and the typechecker will handle intersections and unions of these types.
[ Parent
| on HN ]
There are no comments on this comment yet.