Re: choose-and-remove! operation taylanbayirli@xxxxxx 12 Sep 2015 22:02 UTC

"Arthur A. Gleckler" <> writes:

> Since, at least according to my understanding, you're trying to make
> SRFI 126 more a minimal hash table spec., that makes sense since it's
> O(1) – assuming one can count on hashtable-find to be O(1) with that
> predicate.

Well, I've listed some (admittedly quite vague) inclusion criteria for
utility procedures now, and dropped any pretense of conservatism or
minimalism from the rationale.  I'm trying to be pragmatic more than
anything; it's just that this includes concerns like "don't burden
implementers with the maintenance of too many utility procedures which
people will hardly ever use."

Each additional procedure means: more space taken in the spec, possibly
more space taken in an implementation's documentation, more space taken
in source code, more space taken in automated tests, and probably most
importantly, the risk of squatting a procedure name for "all eternity"
and then noticing it's sub-optimal or even harmful.

That being said, hashtable-pop! is so simple it shouldn't really cause
issues like those.  I might still add it.