Multiple types like in TypeScript

If I think about union types, I think about a “union memory space” where the value is stored in a memory block with the size of the maximum sized element. Was that implemented C or even Pascal (?), I did not remember.

The Multiple types like in TypeScript are just generics helping writing cleaner code that was compiled to Object-Type. The compiler will force the programmer to check each instance of the returned MultiType. In combination with the fabulous smart casting this will create great code.

I will read your mentioned thread, thank you.