[plt-scheme] immutable strings vs. uninterned symbols

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jun 6 19:36:15 EDT 2006

On Jun  6, Doug Orleans wrote:
> Eli Barzilay writes:
>  > It's the concept of a different type for different uses.
>  > Otherwise you would feel just as well in a world that uses
>  > numbers/strings/church-encodings/goedel-numbers for everything.
> Right, but there's more to a type than just what procedures
> accept/produce it.  In some ways that's the least interesting part,

I disagree.

> especially if I'm going to make an abstract type on top of it, in
> which case none of those procedures should be used.

Without functions that generate object of the type, and functions that
work on the type, how can you use it?

On Jun  6, Doug Orleans wrote:
> Doug Orleans writes:
>  > (Are there other differences?  Garbage collection maybe?)
> The MzScheme manual says that interned symbols are only weakly held
> by the internal symbol table, which seems to imply that uninterned
> symbols are never garbage collected.

No, it means that the references to the uninterned symbols are not
preventing them from being GCed.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.