Re: First Impressions on Using Alphora's Dataphor

From: Rene Hartmann <rehartmann_at_t-online.de>
Date: Sat, 28 Aug 2004 22:39:03 +0200
Message-ID: <Pine.LNX.4.33.0408282232040.14702-100000_at_linux.local>


On Fri, 27 Aug 2004, Peter Koch Larsen wrote:

>
> "Laconic2" <laconic2_at_comcast.net> skrev i en meddelelse
> news:MLydnffBvNGntLPcRVn-jQ_at_comcast.com...
> >
> > "Josh Hewitt" <lajos.nagy_at_gmail.com> wrote in message
> > news:1c92edeb.0408260910.60242a59_at_posting.google.com...
> > > - Although it is logical after giving it a little thought, it came as a
> > > nasty surprise that Dataphor demands that all scalar types that might
> > > appear in a context where duplicate elimination is required must have
> > > the less-than (Dataphor calls it 'iLess') operator defined on them.
> >
> > Yes, it is logical.
> >
>
> Why? You only need the operator "same as" (is it "=" or "==" on Alphora?) to
> remove duplicates. I would probably implement duplicate removal using some
> kind of hashing.
>

I would rather suggest using a system-defined comparison operator, which could be based on the internal representation of a type. This operator must only be consistent with the equality operator, so that if A = B then A <= B must also evaluate to true. Since the operator is only used internally for purposes of duplicate elimination, there are no special requirements for it.

--
Rene´ Hartmann
Received on Sat Aug 28 2004 - 22:39:03 CEST

Original text of this message