Email list hosting service & mailing list manager

Re: [scheme-requests-for-implementation/srfi-209] Implementation: New representation of enum-sets, misc. updates (#6) Marc Nieper-Wißkirchen 20 Nov 2020 11:04 UTC

Thank you, John and Wolfgang for your latest work.

May I recommend adding a note to the SRFI document saying that for the
purpose of efficiency and early error detection it is recommended to
work with enum-sets instead of individual enums wherever it is
possible and to use the syntactic form defined by define-enum to
construct enum-sets instead of the procedural interface when possible?

For example,

(enum-set=? colors (color-set red))

should be preferred to

(enum-set-contains? colors (enum-name->enum color-type 'red))

This is even more important for the R6RS part of the interface, which
uses bare symbols and which have to be looked up in a table if they
are not in an enumeration set. On the other hand, operations with
enumeration sets are pretty fast as they just have to work on strings
of bits.

Am Do., 19. Nov. 2020 um 03:58 Uhr schrieb Arthur A. Gleckler
> Merged and pushed.  Since these are changes only to the implementation, the last-call period still ends before 2020-11-23.
> ---------- Forwarded message ---------
> From: Wolfgang Corcoran-Mathe <>
> Date: Wed, Nov 18, 2020 at 5:55 PM
> Subject: [scheme-requests-for-implementation/srfi-209] Implementation: New representation of enum-sets, misc. updates (#6)
> These commits change the implementation of enum-sets and implement John's latest clarifications and edits. Still TODO is the fast syntax-case version of define-enum requested by Marc Nieper-Wißkirchen. Otherwise, everything is in last-call shape. Thanks.
> ________________________________
> You can view, comment on, or merge this pull request online at:
> Commit Summary
> Begin re-implementing enum-sets.
> Fix typo in enum-set record type.
> Implement eset comparisons, set-theoretical, some others.
> Re-implement enum-set traversals.
> Re-implement enum-set-delete and friends.
> Use helper procedure in adjoins, add fast paths.
> Bitmap versions of enum-set-filter/-remove.
> Bitmap version of enum-set-projection.
> Fix errors and typos in helper procedure.
> Tests: Fix unintentional side-effecting in test.
> enum-set-projection: Fix missing argument in procedure call.
> enum-set-adjoin!: Fix missing return values.
> enum-set-delete(-all)!: Fix missing return values.
> Tests: Additional fixes.
> Update implementation README.
> Merge
> make-enumeration: Names used as values.
> enum-set-subset?: Correct semantics (compare name sets).
> Rename to-list conversion, add new.
> Tests for the new enum-set->list.
> File Changes
> M (40)
> M srfi-209-chibi-test.scm (42)
> M srfi-209-test.scm (38)
> M srfi/209.scm (362)
> M srfi/209.sld (3)
> Patch Links:
> —