[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open issues for SRFI 113

This page is part of the web mail archives of SRFI 113 from before July 7th, 2015. The new archives for SRFI 113 contain all messages, not just those from before July 7th, 2015.



On Tue, Dec 10, 2013 at 2:13 AM, John Cowan <cowan@xxxxxxxxxxxxxxxx> wrote:
Alex Shinn scripsit:

> I think strong typing with unique objects is better here.  They are
> less ambiguous, more efficient for many of the utilities, and as you
> say can be used to access the other members of the enum-set.

I grant these advantages, but the simplicity and convenience of symbols
are real advantages too.  I'm trying to work out a design in which
either symbols or unique objects wrapping symbols can be used.

I'd have to see it, but I don't think it's worth the
complexity of supporting both.

> A common pattern I use in Chibi for data structures is to have a
> base library with just the type predicate and -contains?  utility,
> and constructors go in a separate library.  Thus other libraries
> could provide APIs that allow sets as arguments for convenience,
> without themselves incurring any real load overhead.

I don't really understand this use case.  If you accept sets as
arguments, what do you want to be able to do with them?

The canonical use case is SRFI 13.  Many of the procedures
accept a char/char-set/procedure argument.  The only two
SRFI 14 procedures needed to support that are `char-set?' and
`char-set-contains?'.

-- 
Alex