4 ms·
The problem is that it's still a nominal type system, so each empty struct is still a different type. A proper unit type has a single value of that type, and it
by int_19h 1y ago
The problem is that it's still a nominal type system, so each empty struct is still a different type. A proper unit type has a single value of that type, and it's the same throughout the entire program.
- magicalhippo 1y ago> The problem is that it's still a nominal type system, so each empty struct is still a different type. Fair point, though for me that was a feature when I used it in Delphi. Allowed me to differentiate them when using them as type parameters (generics).