Email list hosting service & mailing list manager

Remaining issues Wolfgang Corcoran-Mathe (30 Oct 2020 18:04 UTC)
Re: Remaining issues John Cowan (31 Oct 2020 01:30 UTC)
Re: Remaining issues Arthur A. Gleckler (31 Oct 2020 01:37 UTC)
Re: Remaining issues John Cowan (31 Oct 2020 01:50 UTC)
Re: Remaining issues Wolfgang Corcoran-Mathe (31 Oct 2020 06:16 UTC)
Re: Remaining issues Marc Nieper-Wißkirchen (31 Oct 2020 08:36 UTC)
Re: Remaining issues Wolfgang Corcoran-Mathe (31 Oct 2020 19:02 UTC)
Re: Remaining issues Marc Nieper-Wißkirchen (31 Oct 2020 19:49 UTC)
Re: Remaining issues Wolfgang Corcoran-Mathe (06 Nov 2020 01:03 UTC)
Re: Remaining issues John Cowan (15 Nov 2020 02:06 UTC)
Re: Remaining issues Arthur A. Gleckler (15 Nov 2020 02:31 UTC)
Re: Remaining issues John Cowan (15 Nov 2020 02:36 UTC)
Re: Remaining issues Arthur A. Gleckler (15 Nov 2020 02:53 UTC)
Re: Remaining issues Wolfgang Corcoran-Mathe (15 Nov 2020 02:57 UTC)

Re: Remaining issues Marc Nieper-Wißkirchen 31 Oct 2020 08:36 UTC

Am Sa., 31. Okt. 2020 um 02:30 Uhr schrieb John Cowan <xxxxxx@ccil.org>:

> On Fri, Oct 30, 2020 at 2:04 PM Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz> wrote:
>
>>
>> (1) Can we make empty enum types, i.e. should (make-enum-type '())
>> return a value?
>
>
> I suppose so, though I don't see a use case offhand.
>>
>> (2) enum-set should take one or more arguments, since the empty enum
>> set has no determinable type.
>
>
> It's definitely a mistake that we can't have an empty set.  For example, if the enums represent binary properties of something, there is nothing wrong with the "all properties are false" state.  At one time I had an empty-set constructor, but it looked like `enum-set` could serve that purpose -- but it can't.
>
> I think the best bet is (enum-empty-set enum-type): added.

Hmmm... that doesn't like the right thing to me. If the zero-element
case need special treatment, something is flawed.

Either let `enum-set` always take a type as its first argument (which
can then be checked to assert the other arguments are of this type),
or let `make-enum-type` return two values, the second one being the
type-parameterized `enum-set`.

Or use the idea of R6RS's enumerations, which is enum-set-constructor
applied to the type.

PS Speaking of R6RS, why is there no define-enumeration in this SRFI?