[Top][All Lists]

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

[SUSPECTED SPAM] Re: `thunk-let'?

From: Stefan Monnier
Subject: [SUSPECTED SPAM] Re: `thunk-let'?
Date: Mon, 09 Oct 2017 11:38:47 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> 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?

The semantics of `setq`ing such a var should be: compile-time error.
The semantics of let-rebinding such a variable should be for the new
binding to hide the outer (lazy) one.

cl-symbol-macrolet currently doesn't provide this let-rebinding
semantics, but it should (we already need to fix it for generator.el),
so it's perfectly fine for the new code to just use cl-symbol-macrolet
and then say that if rebinding isn't working right it's due to a (known)
bug in cl-symbol-macrolet.


reply via email to

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