From: Dido Sevilla Date: 2012-02-10T16:28:28+09:00 Subject: Symbol garbage collection I've always wondered why Ruby didn't do garbage collection of symbols, when Lisp implementations here and there did so, and in fact they are essential in macro programming because Lisp programs tend to create a lot of unique symbols at runtime, especially in macro code, with such contrivances as gensym in Scheme and Common Lisp and uniq in Arc. Once upon a time I studied how Ruby implemented symbols and while this representation made symbol garbage collection difficult, it did not by any means make it impossible. In addition to my work on Ruby I am also writing an interpreter for Arc in C, and I made it use just about the same representation as Ruby 1.8 did for symbols. I also devised an algorithm to do symbol garbage collection with that same representation. http://arcueid-arc.org/2012/02/10/symbols-and-symbol-garbage-collection-arcueid-vs-ruby/ I see no reason why the same approach will not work with Ruby as well. -- 普通じゃないのが当然なら答える私は何ができる? 普通でも普通じゃなくて感じるまま感じることだけをするよ! http://stormwyrm.blogspot.com