[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANNOUNCE] Lua 5.0 (work0)
- From: Reuben Thomas <rrt@...>
- Date: Mon, 10 Jun 2002 15:52:47 +0100 (BST)
> > What about my suggestion of an le fallback? (In brief: an le fallback is
> > sufficient for partial ordering; [...]
>
> Do you mean the following rule?
>
> a < b <==> a <= b and not b <= a
Yes
> I really don't like the idea of calling a method twice for each
> comparison...
The idea is that you only use this rule when there's an le callback but no
lt fallback.
> Or you are proposing to have both a 'le' and a 'lt' fallbacks (in a way
> that you can have only one of them when you don't need the "partial"
> stuff)?
Exactly. You can supply either just lt (if you have a total order), or
just le (for simplicity for a partial order) or both (for efficiency for
a partial order) and it will work in all cases.
Making lt optional does make life simpler for the programmer.
--
http://www.mupsych.org/rrt/ | frog, n. a prince waiting for the right kiss