3 ms·
Of course there's nothing new under the sun, this is one of the features of Algol68 (1968) that Wirth discarded when he made Pascal They're not coming, they've
by Taniwha 9y ago
Of course there's nothing new under the sun, this is one of the features of Algol68 (1968) that Wirth discarded when he made Pascal
They're not coming, they've been and gone, probably a couple of times
- tom_mellior 9y agoAll I know about Algol 68 is what I just gleaned from Wikipedia, but there I got the impression that what it had was a limited form. Namely, the type indexed things mentioned in the featured article as present in C++ and D, where you don't have tags and thus cannot usefully distinguish different variants with the same underlying type.
- Taniwha 9y agonope, A68 unions had hidden tags (strictly speaking the spec didn't say they had tags but it was the only obvious implementation) it did have a case statement to switch on the tags and extract the values as described above