> An union type is the C attempt to implement something like sum types
Sum types, unions (in the C sense), and union types are three distinct concepts.
Wikipedia's article confusingly merges the latter two concepts together but they're different thing. TypeScript[1] and Scala[2] have union types, but they have nothing like C's notion of "unsafely reuse the same bits in memory to be interpreted as different things".