3 ms·
Trees can be modelled with sum types, the mathematical dual of product types (records). Java doesn't have sum types and so inheritance has to be used to encode
by willtim 9y ago
Trees can be modelled with sum types, the mathematical dual of product types (records). Java doesn't have sum types and so inheritance has to be used to encode them.