[Top][All Lists]

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

Re: `thunk-let'?

From: Michael Heerdegen
Subject: Re: `thunk-let'?
Date: Mon, 09 Oct 2017 13:40:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Another name could be `lazy-let`.  But if you add it to thunk.el, then
> thunk-let sounds like the better name.

Ok, so let's be brave and aim to add it as `lazy-let' to subr-x.

There is a question I want us to think about: what should the semantics
of a `lazy-let' bound variable be if it is bound or set inside the BODY?
I guess we can't inhibit that further references to the variable are
also translated into calls of `thunk-force'.  Which would mean
we would have to make `thunk-force' setf'able (or introduce a new
atrifical place form for that purpose).

If I do this, the second question is whether any rebinds or sets of
these variables should implicitly create lazy values again or not.  In
the first case, I would have to use a modified version of
`cl-symbol-macrolet' to make that work, but I think it should be
doable.  The second case should be trivial, that's what we get with
`cl-symbol-macrolet' out of the box.

I wonder which behavior people would prefer.


reply via email to

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