3 ms·
The type of a variable can be "x or y or z", so no the compiler won't always know that.
by Dylan16807 3y ago
The type of a variable can be "x or y or z", so no the compiler won't always know that.
- gpderetta 3y agoThat's an union type, right? I would expect it to have a separate discriminant field if there are no available bits in the object representation itself.
- a1369209993 3y agoThe catch there is "separate" - if the object representation is one machine word, you really do not want to have to increase that by a factor of two to store one additional bit of information, and implementors will generally try hard to avoid that if at all possible.
- deleted 3y ago[deleted]