guile-devel
[Top][All Lists]
Advanced

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

Re: gen gc


From: Rob Browning
Subject: Re: gen gc
Date: Fri, 19 Jul 2002 16:32:42 -0500
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-pc-linux-gnu)

Han-Wen Nienhuys <address@hidden> writes:

> The point is that the number should be associated with the object, and
> you have to remember that association, since addresses might change
> between any two calls of object-address.
>
> If we don't have to keep an association, then ...  well we could
> return any random number (say, the outcome of rand() ) and the whole
> procedure is pointless.

Apparently I'm misunderstanding you or the issue.

Earlier I thought you posted that object-address's docs say that it's
supposed to return a value that's unique to the object, and I thought
you also said that that the returned value was only ever used for
display purposes (i.e. no one will ever say "give me the object
corresponding to address N").  

If both of those bits are true, then all I was saying was that when
you create an object, you could assign it a unique integer (from a
counter) -- i.e. stick the integer into the object, and object-address
could just look in the object and return that integer whenever called.

Of course if object-address is infrequently used, this may be a
wasteful approach (storage-wise), but if the value isn't supposed to
change across the lifetime of the object (which is what the docs you
posted made it sound like initially, and what I was thinking about
when I responded initially), then it's a better idea than printing the
(transient) address.

Of course if the object-address docs are wrong, then that's a
different story.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD



reply via email to

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