[plt-scheme] string properties

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Jun 20 22:15:24 EDT 2004

On Jun 20, Neil W. Van Dyke wrote:
> So I'd like to have the library's procedures accept and yield only
> strings, but secretly associate "unreal-string" objects with the
> strings to cache parse results and avoid gross inefficiency.

As a point of reference, the tiny-clos trick of having applicable
objects is to make objects procedures, and a (weak) hash table
associates them with their actual contents.  When MzScheme had
applicable structs, the performace boost was much lower than I
expected...

The difference from your thing is that I used an `eq' table, and you
want to use an `equal' hash table.  In any case, I think that a table
that is both `equal' and `weak' is a tricky thing to manage.
-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.