[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Seeking review of sets and hash tables proposals



On Tue, May 28, 2013 at 10:53 AM, John Cowan <cowan@x> wrote:
Alex Shinn scripsit:

> The language can simply say that the `update', `remove' and
> `insert' thunks must remain valid for their lifetimes.

But what is their lifetime?  Since they aren't tail-calls, they might
conceivably escape either by call/cc or as data structures, and then what?

And then they must still remain valid.  And must remain
valid if they are called multiple times.

The intention is to provide this as a fundamental hash operation.
If it doesn't work in the general case, then it's broken.

What this means at an implementation level is that you either
have to keep track of dirty bits, etc., or keep the impl simple,
such that all it does is compute the hash and check existence
a single time for dispatch, but must recompute the exact bucket
in the callbacks.

-- 
Alex

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports