help-gnu-emacs
[Top][All Lists]
Advanced

[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: Emanuel Berg
Subject: Re: [External] : `let' vs `let*' (was: Re: How do I pass a variable defined in a wrapping let, to a lambda?)
Date: Wed, 16 Mar 2022 01:25:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Re: [External] : `let' vs `let*' (was: Re: How do I pass a variable defined in 
a wrapping let, to a lambda?)
tomas wrote:

>   (setq a 42)
>   (setq b 43)
>   (let ((a b)
>         (b a))
>     (list a b))
>
>   => (43 42)
>
> [...] And one could ask oneself whether it's wise to shadow
> variables from the outer environment

And the answer is: it is foolish.

So, examples are academic, and in practice it doesn't
make sense?

No:

  1. Let `let' be `let*'; and

  2. let let* be an alias to `let'.

So then we would have:
[f -> g denotes (defalias 'f #'g) ]

 obsolete/remove
       ↓
       ↓       dlet* -> dlet
       ↓        let*  -> let
lexical-let -> llet* -> llet -> let _or_ slet [note]
               slet* -> slet

[note] Both make sense: `let' by convention, and intuitive
       that the well-known let under static/lexical scope is
       llet (the lexical let); OHOH it could be alias to slet
       just as well to uphold consistency with the others, as
       dlet means ONLY dynamic/special and slet means ONLY
       static/lexical, so llet should perhaps then mean only
       static/lexical as well which then would be = slet.

`let' is/can be static/lexical AND/OR dynamical/special, the
other two means one for all dynamic/special (dlet) and one for all
static/lexical (slet).

The one.   
The mix.  
The other. 

That's All Folks!

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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