Rust in the 6.2 kernel
Rust in the 6.2 kernel
Posted Nov 26, 2022 14:21 UTC (Sat) by gasche (subscriber, #74946)In reply to: Rust in the 6.2 kernel by atnot
Parent article: Rust in the 6.2 kernel
Another type that is "too vague" is the type of pair `(A, B)` -- and there are not that many standard-library functions defined on it. But we use it all the time! Honestly I think that the criticism against `Either` here comes from a lack of familiarity, rather than a deep reason. We programmers tend to be more familiar with product types than with sum types; for sums the most well-known is `Option<A>` that is the sum (A + 1), and we still need to time to collectively get used to using anonymous sum types when they make sense.
