[Top] [All Lists]

Re: comparators and "error"

2006-05-10 07:15:07

Arnt Gulbrandsen wrote:

I've been doing some editing on the draft, trying out how some things suggested look in prose.

1. It seems useful to me that e.g. ascii-numeric can distinguish between comparing nonequal numbers and comparing out-of-scope input.

Take the equality operation as an example:

"Match" means that the collation knows how to work on the input, and the two inputs are equal as defined by the collation.
"No-match" means that the collation knows how, and the two are unequal.
"Error" means that it doesn't know how to.

Conflating the two latter cases smells of bad design to me, even though the difference may not be useful in every case.

I agree.

2. Even though a collation specification distinguishes between "no-match" and "error", there's no requirement that all protocols must. If the distinction between "no-match" and "error" is pointless in e.g. sieve, can't simply sieve treat the two as equal? Ie. "match" is true, "no-match" is false and "error" is false?

Yes, that is a possibility.

Maybe we should add a new match type :failedmatch which can help distinguish the no-match case from the error?

<Prev in Thread] Current Thread [Next in Thread>