Shammer's Philosophy

My private adversaria

Lisp Symbol Hacking at 20120130

Lisp Symbol Hacking at 20120128 - Shammerismで Symbol の動きについていろいろ見ていたけれども、Programming in the Large: Packages and Symbolsに回答があったように思う。具体的にはここ。

Uninterned symbols are written with a leading #:. These names (minus the #:) are converted to uppercase as normal and then translated into symbols, but the symbols aren't interned in any package; each time the reader reads a #: name, it creates a new symbol. Thus:

(eql '#:foo '#:foo) ==> NIL

Symbol を考えるときは、

  1. Symbol が作成される
  2. Symbol に値がバインドされる
  3. Symbol が intern される

ということを理解しないといけないようだ。そして、intern されていない場合には #: 付の表記になる。intern されていない、つまり、画面に表示された直後に消えてしまっている、という感じだろうか。