emacs-devel
[Top][All Lists]
Advanced

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

Re: thunk.el: Document that thunk-force == funcall?


From: Michael Heerdegen
Subject: Re: thunk.el: Document that thunk-force == funcall?
Date: Tue, 17 Nov 2020 22:07:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Tomas Hlavaty <tom@logand.com> writes:

> why would you delay such boolean value in a thunk?
>
> to avoid computing the value in case it is not used at all?
>
> when something-is-the-case how can it take long to find out?  why it
> cannot be substituted with t at think-time?

The result might not be defined at think time.  It might depend on "the
environment".

Say the code loops over a list of files or so (not known at think time).
The thunk could "contain" a test that might take long (e.g. something
that might need to look at the file's contents) but the result is
interesting only sometimes, depending on the result of other tests (also
not known at think time).

Michael.




reply via email to

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