Closed JordanMartinez closed 3 years ago
I’m wary of adding things before we have a concrete use case for them. Is that the case here?
I don't have a good case in mind. I believe this would be required if one ever created a type-level list of booleans and wanted to find an element within that list. But I can't think of a scenario where one would want to do that at the type-level.
@kl0tl Since you originally suggested this, do you have any concrete use cases in mind?
I did not propose this class with a specific use case in mind, but I guess it would be needed to implement the characteristic function of a relation that holds either when it does or fails for all its premises (but not when it fails only for some of them). For example with type-level routes you may need this to know if all routes in a set of alternatives are either auth protected or unprotected.
Without some boolean equality we can only express the characteristic function of relations that hold when they do for all (with And) or any (with Or) of their premises. The same line of reasoning would support also adding xor and logical implication.
I’m fine waiting for concrete use cases though, this is easy enough to implement elsewhere if needed in the meantime.
We could leave this PR open until such a use case emerges and then merge this PR and make a release pretty trivially, right? However, I'm not sure I'd want an open PR on a repo that may never get merged. So, should this actually be closed instead?
I’d rather close this than leaving it open for merging at some unspecified future date, yeah. The PR will still be there if someone looks at the list of closed PRs.
Fixes #65