4 ms·
I think what the author is hinting at is that you don't want to write a big `if` statement every time you use a node. I would include sum types in what they me
by captainmuon 3y ago
I think what the author is hinting at is that you don't want to write a big `if` statement every time you use a node.
I would include sum types in what they meant with polymorphism here, because as you say there is no big practical difference between using an `IExpression` interface, or an `Expression = Sum | Product | ...` sum type for the nodes.