[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New release of SRFI 113
- To: John Cowan <cowan@xxxxxxxxxxxxxxxx>, srfi-113@xxxxxxxxxxxxxxxxx
- Subject: Re: New release of SRFI 113
- From: Kevin Wortman <kwortman@xxxxxxxxx>
- Date: Sat, 07 Dec 2013 20:03:22 -0800
- Delivered-to: srfi-113@xxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=lW1dl9i9cg+0twQAvfgDXFauUobEmLr7rP+5Aj0KAQI=; b=HpzIy4spAoBslkS9UMBETK7u58E/9FdleF27/GDQUTw5zdke5RuGeohEPEpB4H6pR8 3APkfEtdqWrQeGrSbCpeV7oqzOWO6VoQtMzO2kTPcNGD3AbSNwDupjPtG57kOYelTKQv Ti+tPvGad36pHOWj8IhsKrOMWAW1R1CdAklibGAcOzjvz1EryM9MVNHMMdKP5rckaL9d dMjYqBzXMDZthq0ji5oPHXv1zrzip5uDXWhM+ZlSL3euyJoCervIq6aNMVDjE3Jf2zGh kSJd4Jp+C6E44Bbm1tScHn68tkT0C5oho1qc8uBu1BRsIhLtNtJhyKS95UEiZm69QV95 rUTQ==
- In-reply-to: <20131204042532.GD22362@mercury.ccil.org>
- References: <20131204042532.GD22362@mercury.ccil.org>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
On 12/03/2013 08:25 PM, John Cowan wrote:
> Everyone: please review. I plan to recommend that WG2 make this a
> optional part of R7RS-large.
What happens when some of the elements passed to a set constructor are
equal according to the comparator? Only one of the duplicate objects
will make it into the set and the programmer may want to control which.
In another thread I think we settled on optionally passing in a
procedure to decide between pairs of duplicate elements. This issue
applies to list->set, list->set!, set-map, and bag->set as well.
"However, repeated calls to this procedure will return a list in the
same order until the set is mutated." Is there a motivation for this
requirement? An implementation could conceivably want to reorder sets
between mutations. For instance a hashtable might voluntarily shrink
itself to cooperate with garbage collection.
Personally I would prefer the term "multiset". Has that already been
bag-decrement! cannot make the count of elements less than zero, right?
It seems like the most natural equality predicate for enumeration sets
is symbol=?, not eq?.
The symbols passed to define-enumeration-type and make-enum-type must
all be distinct, right?
Why not include ...-intern! procedures for all types of sets?