Re: Enum comparisons and value-lookup Wolfgang Corcoran-Mathe 19 Sep 2020 17:55 UTC

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
> <>:
> > 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.

> > I'm thinking out loud here, but would it make sense to provide an
> > enum-set constructor, say enum-value->enums, which takes an enum-type
> > t and a value v and returns an enum-set of all the enums in t with
> > enum-value v?
> The filter procedure is the more basic one, so IMHO if any, it should
> be provided.

OK, yes.  It is more fundamental, and thus preferable to specific
filters.  The only advantage of providing an explicit
enum-value->enum-set procedure is that it might be a slight efficiency

Wolfgang Corcoran-Mathe  <>

"The composer makes plans, music laughs." --Morton Feldman