emacs-devel
[Top][All Lists]
Advanced

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

Re: [ANN] New library stream.el in ELPA


From: Michael Heerdegen
Subject: Re: [ANN] New library stream.el in ELPA
Date: Thu, 15 Oct 2015 12:08:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

"John Wiegley" <address@hidden> writes:

> What I wonder is, can you generalize this beyond cons cells?  I mean,
> can we have a general lazy evaluation framework, instead of just lazy
> lists?  The API I was thinking of was:
>
>     (let ((x (thunk-create FORM)))
>       (thunk-eval x))
>
> The idea being that 'x' is a self-modifying thunk which only evaluates FORM
> the first time it is forced, but immediately returns the result value after.

Note that there is actually already something like that in Emacs, though
it's hard or nearly impossible to find:

  lisp/url/url-future.el

You may want to see the thread "Generators (iterators) for Gnu Emacs"
from Dec of last year, where this had been mentioned.

Stefan meant he wanted to wait giving it this thing a "future-" prefix
until we have understood the consequences of this kind of abstraction.

Just want to mention this here, I'm not against writing a new lib.


Regards,

Michael.




reply via email to

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