[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uninterned symbols

From: Marius Vollmer
Subject: Re: Uninterned symbols
Date: 24 May 2001 23:54:32 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Juho Östman <address@hidden> writes:

> At 00:15 18.5.2001 +0200, Marius Vollmer wrote:
> >[Taken to guile-devel.]
> >    guile> (define g (gensym))
> >     guile> (define h (list g g))
> >     guile> h
> >     (#1=#~g0 #1#)
> >
> >We would have to fix the reader and printer to get this right, I
> >think.
> How do you implement such a printer efficiently? Shouldn't it maintain
> a table of all printed objects and compare each with the existing ones?

Yes, I think that's the idea.  Using hashtables, the comparison should
be relatively cheap.  Guile already detects circles and shared
structure in the output, but it can't read it back in.  Also, the way
it currently flags shared structure, the reader would have to keep a
table of all objects read so far, instead of only those objects that
are needed for `#n#'.  There ought to be enough useable code out there
for this, tho, maybe in GCL.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]