On 2021-05-29 11:17 -1000, Shiro Kawai wrote:
> That the predicate of operations without '/key' only takes value is
> following vector operations (srfi-133)?
This was, in part, modelled on Haskell's IntMap library, which
provides `withKey' versions of most procedures. Aside from the
convenience of having /key and no-key variants, I also wanted to
increase compatibility with procedures like hash-table-map, fold (SRFI
1), vector-fold, etc. which do not pass keys/indices, towards a
possible future SRFI generalizing folds and maps.
> My preference is to align it to dictionary (mapping) interface (i.e.
> predicate of imapping-count etc takes a key and a value), and drop the
> '/key' variants altogether, for value-only version can be easily realized
> with key-value version.
Yes, I'm tending to agree. This will be a big change, though, so I'd
like to think a bit more before committing to it.
The clear pattern of most SRFIs is toward providing the most general
forms and letting the library user specialize them. Following that
pattern might reduce the idiosyncracy of this SRFI and make it a
bit easier to adopt.
Thanks again for the feedback.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"Invent and fit; have fits and reinvent!" --Alan J. Perlis