Taylor R Campbell scripsit:
> I suggest providing another procedure REFERENCE-BARRIER that
> guarantees whatever object you pass to it will not have been GC'd
> before the call to REFERENCE-BARRIER.
How is that different from stashing the object in a variable?
> The example implementation in Racket is incorrect.
Thanks, of course you're right. I'm not really used to ephemerons yet.
> Some of the text was lifted verbatim from the MIT Scheme reference
> manual, including most of the paragraph starting `This procedure must
> be used with care...'. This should be acknowledged. (It's also not
> clear which procedure `this procedure' refers to.)
I'll improve the reference as you noted in your second email.
> I encourage providing some automatic tests. Here's a place you might
> start:
>
> http://git.savannah.gnu.org/cgit/mit-scheme.git/plain/tests/runtime/test-ephemeron.scm
Good idea.
> http://mumble.net/~campbell/tmp/ephemeron.scm
> http://mumble.net/~campbell/tmp/ephemeron-hash.scm
>
> I would be happy to provide them under an appropriate licence for
> inclusion in the SRFI if you like.
Please do.
> Bruno Haible, `Weak References: Data Types and Implementation', 2005-04-24.
> http://www.haible.de/bruno/papers/cs/weak/WeakDatastructures-writeup.html
Will do.
--
John Cowan http://www.ccil.org/~cowan xxxxxx@ccil.org
You know, you haven't stopped talking since I came here. You must
have been vaccinated with a phonograph needle.
--Rufus T. Firefly