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

Various comments

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

Collections Hierarchy

A sequence might also be considered a subtype of a dictionary, since
the dictionary contains values associated with arbitrary keys and the
sequence contains values associated with non-negative integer keys.

Iterator Mutation

Why would an iterator change the key rather than the associated value
in the case of a dictionary? If this is a reference to the special key
iterator defined for dictionaries, it might be clarified.


Are the "%" characters actually supposed to be "*" characters, or did
I miss something here? Although it is customary not to define the
return value of destructive functions, the *-remove! functions might
return #f or #t to indicate whether the collection was actually
modified, since removing a value that is not present is not defined as
an error.


The *-iterator procedures do not specify the order in which elements
of non-ordered collections will be returned. This would seem to imply
that the elements of non-ordered sequences are returned in arbitrary
order rather than ordered by index. I assume this is intentional.

The constructor procedures do not define how the elements of mapped
collections (dictionaries and sequences) are to be specified. The
construction of dictionaries is detailed below, but that of sequences
is not. I assume that it is not possible to explicitly specify the
index of a value. But will the index of a value correspond to its
position in the argument list, or not?


The generic *? definition is echoed in many of the following sections
devoted to individual collection types, including the bags section.
In my humble opinion, many of the procedures defined would benefit
from multiple arguments. Why will bag-add!, for instance, add only a
single value to a bag, instead of multiple values?


As sets were defined to contain only unique values, the definition of
set-contains? might be refined. Typical set procedures, such as union
and intersection are not defined, however. As there most certainly is
a very good reason for this omission, it might be appropriate to
mention this reason at this point.


The definition of dict? is identical to that of flexible-sequence? The
definition of make-dict conflicts with the definition of make-* given
under the heading "Ordered Collections". At the very least, this would
seem to indicate that there are no ordered dictionaries, which would
be no less useful than ordered sequences, as far as I am concerned.

Why are the procedures called dict-get and dict-put! instead of
dict-ref and dict-set!, as might be expected for consistency?

And finally, just a few typos I noticed: Section "Issues", should read
"it is difficult" instead of "it difficult". The "Collections
Hierarchy" diagram should read "Flexible Sequence" instead of
"Flexible Sequenece".


Michael Burschik