4 ms·
NULL can be its own type, but the union between the set of integers and NULL is equally valid. However, that new set created by this union is not just integers.
by anfilt 6y ago
NULL can be its own type, but the union between the set of integers and NULL is equally valid. However, that new set created by this union is not just integers.
To represent a type that can be NULL or an integer it should be a different type.
Like I said the problem again is mostly your data is not always contained to your language. If you export GPS coordinates some systems may treat this composite type incorrectly. So even if you have a strong type system people will just be lazy.