Coding 2026-01-30
Okay. So.
I've got a sufficient plan for implementing subsumption checking, with just one tiny obstacle: I'm not sure what to name the function that handles this.
The requirements I'm working with are:
- Failure nodes subsume and are subsumed by all corresponding nodes. (Aside: for the same reason that I have this requirement, coercion failure should not emit an instance constraint when coercing a failure node.)
- Otherwise, nodes of different types have no subsumption relationship.
- Finally, any given class of node needs to implement custom logic, which may recursively check for subsumption of specific fields.
The way I decided makes sense to implement this is to define a protocol with a method that takes an argument of type Self, and define a top-level function that performs the required instance checks, then delegates to the protocol method. The protocol method, meanwhile, is free to call back into the top-level function. This top-level function takes two arguments that both implement the protocol, and returns true if the second argument subsumes the first, and false otherwise.
There are some other details that will make implementing other improvements nicer, but fundamentally, the important thing right now is that I'm not sure what to name the function. I could just name it is_subsumed_by or something, but I'd like something that's a little "happier" appearing in prefix position, rather than infix.
Once I have something I'm okay with, I can get to work on the implementation, and knock it out pretty quickly.
For now, I need to get ready for bed.
Good night.