Re: bugs in queue operations

Michael Sperber <[email protected]> Tue, 29 Dec 2009 10:58:50 +0100
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
Robert Ransom <[email protected]> writes:

> On Tue, 22 Dec 2009 15:53:56 +0100
> Michael Sperber <[email protected]> wrote:
>
>> Yours and the one in place seem pretty much equivalent, in terms of the
>> changes you made.
>
> No -- he made the queue record's HEAD field immutable and stuck an extra
> pair at the beginning of the queue's list, so that queue operations
> only need to modify cdrs and the queue's TAIL field.  His data
> structure allows all queue mutations to be performed through two
> functions, one to insert elements and one to remove them (NULLIFY-CDR!
> is a special case of COPY-CDR!).

I'm sorry - I was pretty vague.  From my standpoint, which used to be
try to make the CDR instead of the PROVISIONAL-CDR work, the important
aspect of the queue code was the same in yours and Taylor's code.

> No -- his DEQUEUE! is careful to throw its exception outside its
> proposal.

Oops, I missed that - sorry about that.

> And keeping the coding style consistent is rather less important than
> keeping bugs out.

Absolutely.  All other things being equal though, it was a factor.  (As
was the license/copyright issue, btw.  Hopefully more on that in the
near future.)


-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla