eq and hashing (was Re: [plt-scheme] How to make unit functors?)

From: John Clements (clements at brinckerhoff.org)
Date: Thu May 29 13:35:35 EDT 2003

On Thursday, May 29, 2003, at 01:21  PM, John Clements wrote:

>
> On Thursday, May 29, 2003, at 01:01  PM, Robby Findler wrote:
>
>>   For list-related administrative tasks:
>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>> At Thu, 29 May 2003 17:34:44 +0200, Jens_Axel_Søgaard wrote:
>>>   For list-related administrative tasks:
>>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>
>>> Robby Findler wrote:
>>>
>>>> But, if you take the hash-code of one of them and then wait a while
>>>> (and perform some garbage collections) then take the hash-code of 
>>>> the
>>>> other, you'll find that they are different.
>>>>
>>> I have understood the hash-code will remain the same as long as the 
>>> symbol
>>> (that specific) is alive.
>>
>> That's right. The "one of them" and the "other" above refer to two
>> different 'x symbols (from my earlier message), typed in at different
>> times.
>
> Just to have the question out there:  how bad would it be never to 
> collect (the strings representing) symbols? The up side would be that 
> this problem would go away.  The down side is that certain loops could 
> exhaust memory... but _only_ those where the loop included a 'read' or 
> equivalent. How many symbols are interned while starting up DrScheme, 
> for instance?

yikes... looks like at least 69,900.  But how many get collected?

john

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1437 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20030529/9096794a/attachment.bin>

Posted on the users mailing list.