[slime-devel] Re: weak hash tables and presentation

Helmut Eller heller at common-lisp.net
Mon Feb 4 15:17:28 UTC 2008


* Geo Carncross [2008-02-04 04:57+0100] writes:

> Hello,
>
> I've been looking over adding weak hashtable support to ECL, when I
> took a closer look at slime's use of them. Maybe they were used more
> aggressively in the past, but now they seem to only be used by the
> presentation contrib. I'm not sure they're necessary for that- as long
> as they're in the REPL shouldn't the presentation keep an extra
> reference to them?

Some people prefer weak references for this case.  I guess weak
references make it easier to "sell" presentations.

> Perhaps a better way to deal with this is to have
> slime indicate what objects its holding and/or clear this buffer when
> it stops using them. This might better belong in a per-connection
> thing, and I wanted some advise on this before I started hacking on
> this.

That sounds like a quite a bit of work.  Don't know if it's worth to
bother.  Presentations work also with normal (non-weak) hashtables and
there is already a command to manually clear all presentations on the
Lisp side.

> Are the weak hashtables legacy? Are they going to be used in
> preparation for something? Is this the only part that needs dealing
> with? 

Weak hashtables are only used for presentations and currently there
are no plans to use them for something else.

> Would it be better still to add weak hashtables to ECL anyway.

There are probably uses for weak hashtables outside of Slime.  But it
might be better to spend the time on other features like better
source-location tracking etc.

Helmut.




More information about the slime-devel mailing list