[Top][All Lists]

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

Re: [External] : `let' vs `let*' (was: Re: How do I pass a variable defi

From: tomas
Subject: Re: [External] : `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?)
Date: Tue, 15 Mar 2022 16:41:24 +0100

On Tue, Mar 15, 2022 at 03:26:17PM +0000, Drew Adams wrote:
> > would it be a good idea to just have `let' and
> > that would then be the same as today's `let*'?
> No.  Having both makes it clear(er) to _human_
> readers when some of the bound variables might
> depend on others.

Besides, sometimes you actually *want* that
independence (aka frozen environment). Here's
a simplistic example

  (setq a 42)
  (setq b 43)
  (let ((a b)
        (b a))
    (list a b))

  => (43 42)

Of course, a real-life example might be more complex.
And one could ask oneself whether it's wise to shadow
variables from the outer environment (the only case
which will show differences between let and let*, AFAIK).


Attachment: signature.asc
Description: PGP signature

reply via email to

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