Re:Embedded Swift on the Raspberry Pi Pico
by tialaramex on Wednesday March 06, 2024 @08:31AM
(#39615745)
I have never seen this called a "union", and that's certainly not what people mean when they speak of a "tagged union".
[ Parent
| on HN ]
Re:Embedded Swift on the Raspberry Pi Pico
by bmitc on Wednesday March 06, 2024 @09:04AM
(#39616059)
What do you think tagged unions are? What languages are you referring to?
F# calls these discriminated unions. OCaml calls them variants or tagged unions.
https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...
Re:Embedded Swift on the Raspberry Pi Pico
by tialaramex on Thursday March 07, 2024 @04:30AM
(#39626978)
Huh. I was thinking about this in much lower level terms, it seems weird to me to define these structures recursively when how they're actually stored is thus omitted yet that's actually crucial, but I guess if you work in a sufficiently high level system you don't care about the implementation details.