> <i>In Rust we have Option<T>, which is equivalent to T | null</i><p>No, not true!<p>As the author correctly states earlier in the post, unions are not an exclusive-or relation. Unions are often made between disjoint types, but <i>not always</i>.<p>This becomes important when T itself is nullable. Let's say T is `U | null`. `Option<Option<U>>` in Rust has one more inhabitant than `U | null | null` in TypeScript - `Some(None)`.<p>Union types can certainly be very useful, but they are tricky because they don't compose like sum types do. When writing `Option<T>` where T is a generic type, we can treat T as a totally opaque type - T could be anything and the code we write will still be correct. On the other hand, union types pierce this opacity. The meaning of `T | null` and the meaning of code you write with such a type <i>does</i> depend on what T is at runtime.