Re: Enum comparisons and value-lookup Wolfgang Corcoran-Mathe 19 Sep 2020 18:00 UTC

On 2020-09-19 13:55 -0400, Wolfgang Corcoran-Mathe wrote:
> On 2020-09-19 19:33 +0200, Marc Nieper-Wißkirchen wrote:
> > Am Sa., 19. Sept. 2020 um 18:35 Uhr schrieb Wolfgang Corcoran-Mathe
> > <xxxxxx@sigwinch.xyz>:
> >
> > > I think that the enum=?, enum<?, etc. forms should all require at
> > > least two enum arguments, unless there's some strong reason for
> > > keeping the zero- and one-argument cases.
> >
> > Keeping the one-argument case for <? makes sense for "compatibility"
> > to the SRFI 1 lset interface.
>
> That makes sense to me.  I see that SRFI 113 also keeps the
> one-argument case.

However: Here we are talking about comparing enums, not enum-sets.
It may make sense to follow SRFI 1 for set-comparisons, but, as a
general pattern, one-argument comparisons are silly.  (R*RS string<?,
etc. require at least two arguments, e.g.)  So I'm thinking that I
still prefer

    (enum=? enum1 enum2 enum3 ...)

and the like.

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>

"It is better to forget time altogether.  Time plays no role at the
fundamental level of physics." --Carlo Rovelli