Re: Weakness of "non-object" types
Takashi Kato 04 Dec 2015 12:28 UTC
> ***
>
> Booleans, characters, numbers, symbols, and the empty list object are
> never stored weakly or ephemerally.
>
> *Rationale:* Objects of these types can be recreated arbitrarily, such
> that a new instance is equivalent (as per `eqv?`) to a previous
> instance, even if the previous instance was deallocated and the new
> instance allocated freshly. Therefore objects of these types must be
> considered alive at all times even if no references remain to them in
> a program.
>
> ***
>
> This means that if you (hashtable-set! weak-key-table 'foo object), you
> will keep 'object' alive until either the weak-key-table is GC'd, or you
> clear or change the association for the symbol foo.
In my understanding, R6RS didn't specify those values to be non-GCable object.
And implementations may GC symbols (at least Sagittarius does). So it seems
a bit too much to specify like this, at least for me.
Cheers,
_/_/
Takashi Kato
Email: xxxxxx@ymail.com