[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).
Cheers
--
t
signature.asc
Description: PGP signature
- Re: How do I pass a variable defined in a wrapping let, to a lambda?, (continued)
- Re: How do I pass a variable defined in a wrapping let, to a lambda?, Michael Heerdegen, 2022/03/11
- Re: How do I pass a variable defined in a wrapping let, to a lambda?, Eric Abrahamsen, 2022/03/11
- Re: How do I pass a variable defined in a wrapping let, to a lambda?, Emanuel Berg, 2022/03/11
- Re: How do I pass a variable defined in a wrapping let, to a lambda?, Jean Louis, 2022/03/12
- `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?), Emanuel Berg, 2022/03/14
- Re: `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?), Jean Louis, 2022/03/15
- Re: `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?), Emanuel Berg, 2022/03/15
- RE: [External] : `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?), Drew Adams, 2022/03/15
- Re: [External] : `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?),
tomas <=
- Re: [External] : `let' vs `let*', Stefan Monnier, 2022/03/15
- Re: [External] : `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?), Emanuel Berg, 2022/03/15
- Re: [External] : `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?), Emanuel Berg, 2022/03/15
- Re: How do I pass a variable defined in a wrapping let, to a lambda?, Emanuel Berg, 2022/03/14
Re: How do I pass a variable defined in a wrapping let, to a lambda?, Emanuel Berg, 2022/03/11