[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] Add new function to test whether a key is present in a hash
RE: [PATCH] Add new function to test whether a key is present in a hash table.
Thu, 15 Feb 2018 18:50:06 -0800 (PST)
> > But isn't it better to define this in C?
> To me the answer is usually no, unless it's speed-critical.
To me too, the answer is usually no. If this is done
in Lisp it is presumably because it might be useful to
someone to modify or advise, or at least serve as food
for thought. In that case, the code should be as clear
> PS: I think a more interesting function to provide would be some
> gethash-ref which would return some kind of "reference" to the entry, so
> we can afterwards update that hash-table entry without (re)computing the
> hash (i.e. some kind of equivalent to `intern` after which you can just
> do `set` which doesn't involve hashing any more).
Definitely more interesting.
> But that would imply
> a fairly significant amount of design to make it work.