[Top][All Lists]

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

Re: frames vs. weak hash tables and garbage collection

From: Stefan Monnier
Subject: Re: frames vs. weak hash tables and garbage collection
Date: Sat, 29 Sep 2007 14:28:16 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

>> But it seems that `values' is never flushed, so it is a source of leaks.
>> We should probably fix it (I'd remove it since almost noone even knows that
>> it exists, but I guess Richard uses it once in a blue moon).
>> I don't use it myself.  I put it in because a history of values
>> is a useful thing for any read-eval-print loop.  We could delete it,
>> but it might be better to do more to inform people about it.
>> For instance, mention it in the text in the *scratch* buffer.
>> Then they might indeed find it useful.  Or if they don't,
>> we could delete it.
>> I agree with the suggestion to truncate it to a specified maximum
>> length.  How about 40?

> Personally, I can't remember using anything more than (car values).
> Maybe once I used something older than the most recent addition to the
> list.

> So it seems to me a length of 3 would probably be plenty.

> By the way, the name “values” is not good.  I would suggest
> “eval-expression-recent-values”.

ielm implements its own mechanism for it and it calls it "*", "**", and
"***", giving access only to the last 3 values.
I do use these occasionally (contrary to `values' which I've never used).

So I guess 3 is plenty indeed.  In many circumstances where I could use this
kind of feature I prefer using (setq sm-tmp <exp>) and then refer to that
value as `sm-tmp' this way I can reuse this value many times easily
(whereas with `values' I'd have to keep track of the position within the
list etc...).


reply via email to

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