Hi,
Attila Lendvai wrote: [sorry to get back that late at you]
i've implemented another version of first-iteration-p and first-time-p as discussed. please find a patch attached with some tests, it's relative to the 1.4 release.
The user API looks ok, however the way you change add-binding removes safety checks: several uses must have the same default initialization and type, etc. This could cause future extensions to break. I think the make-xyz-binding API should be used, that's what they are for, and they also provide for the optional type declarations. I agree the many make-*-binding are confusing. It's also confusing me every time!
You once wrote you had a bad feeling about (setf (cddr entry) ...). But it is the "API" for adding extra information to bindings: "The alist entry is returned. It can be used to store additional info ..."
< (locally (declare (optimize safety ...
(locally (declare (optimize (safety 3)...
While I can indeed remember a bad declaration (revealed by sbcl/cmucl) somewhere in the testsuite fixed on 2005-05-20, the above change is not necessary. SAFETY just means (SAFETY 3). It's been there since CLtL1. See CLHS about OPTIMIZE.
Which Lisp caused you to change all these declarations? Did it generate an error? Please report a conformance error to the implementor.
The error I fixed on 2005-05-20 was an incorrect (declare (safety) ...) instead of (declare (optimize safety ...)).
Regards, Jörg Höhle.