Closed amomchilov closed 3 weeks ago
I'd rather not have this because right now all of the enums can be checked for exhaustiveness by the compiler, but if we add this then every enum everywhere has to account for a NULL node type. I would prefer explicit checks for NULL, for fear that we might accidentally introduce some other ways to get to a NULL node (since it would be the 0 value).
There's a number of times when I need to check a
pm_node_t
fornull
before discriminating on its type, like so:It would be nice if there was a special
PM_NULL_NODE
case:This has 3 benefits:
case PM_NULL_NODE:
null
.Are there any downsides?