On Wed, Dec 19, 2018 at 6:36 AM Tom Lane <t...@sss.pgh.pa.us> wrote:
> I don't really find it "natural" for equality to consider obviously
> distinct values to be equal.

The Unicode consortium calls our current behavior within comparisons
"deterministic comparisons" -- it's something they're not so keen on:

https://unicode.org/reports/tr10/#Deterministic_Comparison

I suggest using their terminology for our current behavior. I can see
where Peter was coming from with "natural", but it doesn't quite work.
One problem with that terminology is that already refers to a sort
that sorts numbers as numbers. How about "linguistic", or "lexical"?

There is a significant cultural dimension to this. I suspect that you
don't find it "natural" that obviously distinct values compare as
equal because you're anglophone. That's the exact behavior you'll get
when using an unadorned en_US collation/locale, I think.

> As a counterexample, the fact that IEEE
> arithmetic treats 0 and -0 as equal seems to cause about as many problems
> as it solves, and newcomers to float math certainly don't find it
> "natural".  So I object to that particular naming.

FWIW, I don't think that your IEEE analogy quite works, because you're
talking about a property of a datatype. A collation is not intrinsic
to any collatable datatype. Fortunately, we're not required to agree
on what feels natural.

-- 
Peter Geoghegan

Reply via email to