That explanation of union types as simply conflating the type checking with the type access does make it even wilder to me that lots of languages don’t (properly) support that. It seems like a no-brainer to want that.
Although, I guess, adding a whole pattern matching system to a language to allow for this type-checked access, that’s probably what’s more controversial…
That explanation of union types as simply conflating the type checking with the type access does make it even wilder to me that lots of languages don’t (properly) support that. It seems like a no-brainer to want that.
Although, I guess, adding a whole pattern matching system to a language to allow for this type-checked access, that’s probably what’s more controversial…