This question is being asked for the purposes of evaluating whether or not attempting to use things I picked up in college was a good idea, or even remotely defensible.
Last year I wrote a 'formula creator' for figuring out what to do with fields or how to populate fields of HL7 data. The fact that it's HL7 data is almost unimportant, except for the fact that it's not always known whether or not an HL7 field is going to exist or if it's going to repeat.
Therefore, I thought, if I need to get a list of these fields I can return myself a set of them. If I don't find them at all, I can add an undefined, fuzzy value, to the set. Then I can evaluate certain things on the set, (i.e. do all of them exists, do more than 6 match some regular expression, do the ascend from greatest to least).
Everything works OK, except what to do with 'All Of' and empty set.
For the interest of making a program easy to use, should 'all of ' return true or false? I tried to make a case that "In set theory, the existential operator yadda yadda deaf ears".
I'd like an answer to the first question, because it may require going back to the drawing board, but I'll fast forward a to a few months ago we got around that problem by never having an empty set. If we encountered 0 fields in the HL7 message, we'll just ploink undefined in the set.
The way I wanted to use undefined was as some sort of catalyst for, "I have no idea". So True or Undefined = Undefined, False and Undefined = Undefined and Not Undefined = Undefined. I made it a point to be very consistent in my programming with this, but everything that ailed the program could have been alleviated by making "Not Undefined" = True.
I told the two guys who actually use my program to 'always make his formulas to expect the true case', cuz that's how Don Knuth does it.
In summary, my program works. The problem is that it is encumbered by my adherence to principles, clearly outside the domain of the problem, that if I slackened would make the program flow better and function without requiring me to consult the source code.
My question is, should abstractions match the domain?
Can I legitimately argue to a nurses, bosses and (more military minded) programmers that "all of an empty sack is true" or "the opposite of unknown is still unknown"?