[racket] FW: weakly held symbols?
Thanks.
After your reassurance I found out what I did wrong in my code. I was
confused by the fact that in my code will-try-execute always returned #f,
but that was due to the following error: I registered the weak boxes in
stead of the contents of these boxes.
_____
From: Carl Eastlund [mailto:carl.eastlund at gmail.com]
Sent: martes, 28 de enero de 2014 1:28
To: Jos Koot
Cc: Racket Users
Subject: Re: [racket] FW: weakly held symbols?
This isn't a typo. The docs are talking about the properties of the symbol
tables for interned and unreadable symbols. There is no symbol table for
uninterned symbols, so it wouldn't mean anything to talk about it.
Here's what this means for an interned symbol: you can create one, and while
a reference to it exists, it stays in the symbol table. Any time you intern
the same string, you'll get back that symbol. However, if all references to
that symbol vanish, the symbol table is free to release that symbol. If
anyone interns the same string again later, a new symbol will be created.
For nearly all purposes, this is completely transparent, because you
couldn't possibly have a copy of the old symbol to compare. There's almost
no way to tell that the symbol you got before and the one you got after were
different. The only way you'd ever know would be either by tracking memory
use statistics, or by comparing the results of something like eq-hash-code,
neither of which should be surprising to find out behaves impurely.
Carl Eastlund
On Mon, Jan 27, 2014 at 5:53 PM, Jos Koot <jos.koot at gmail.com> wrote:
It appears that my previous email was not sent completely. Sorry for that.
Here is the complete question.
Hi to all,
Section "3.6 symbols" of the Racket reference manual states:
Interned and unreadable symbols are only weakly held ... but a symbol maay
disappear when ... used as the key in a weak hash table ...".
I would understand:
UNINTERNED and unreadable symbols are only weakly held ... but a symbol may
disappear when ... used as the key in a weak hash table ...".
May be just a typo, but as I am not sure I understand the docs well, I post
my question here instead of posting a bug report.
Greetings, Jos
____________________
Racket Users list:
http://lists.racket-lang.org/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140128/f3519033/attachment-0001.html>