2 ms·
Interpreting JSON is a good concrete example. But I wonder if that hints at that sum-types are mostly good for writing interpreters (and compilers). Another go
by galaxyLogic 6y ago
Interpreting JSON is a good concrete example.
But I wonder if that hints at that sum-types are mostly good for writing interpreters (and compilers).
Another good example mentioned is nullable types. It seems null is so important that many programming languages have built-in support for it. So it seems null-types make null unnecessary. (?)
I can also see that sum-types are useful for modeling data. But are there any (relational or otherwise) databases which have support for sum-types?