chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] records in evicted objects


From: Kon Lovett
Subject: Re: [Chicken-users] records in evicted objects
Date: Wed, 23 May 2007 11:16:37 -0700


On May 23, 2007, at 10:44 AM, Dan Muresan wrote:

The zeroth "slot" of the record contains the symbol representing its
type. When you evict the record, you also evict the symbol. The
interned and uninterned symbols are not equal, hence the type-check
failure when it is inspected.
(equal? :pare (object-evict :pare)) => #f
You could set the slot-value back to the non-evicted, interned symbol:

Well, the Chicken manual warns against setting slots in evicted objects to non-evicted data, so I'm not gonna do it.

I think the right thing to do would be to change the SRFI-9 implementation so that, for evicted objects, it skips the record type test.

The misc-extn egg provides SRFI-9 workalikes that "... skips the record type test."


Best,
Dan


_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]