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

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

Re: let, let*, oh, why [was: Elisp - Function returning a list]


From: Emanuel Berg
Subject: Re: let, let*, oh, why [was: Elisp - Function returning a list]
Date: Fri, 18 Dec 2020 15:27:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis wrote:

>> Then use `let' and `let*'.
>> 
>> Write code as one intuitively does, based on functions that
>> do stuff and/or return stuff.
>> 
>> When done, byte compile.
>> 
>> Simple simple simple. Actually it is much easier to do
>> right than to do wrong in this case.
>
> I do follow that workflow as you explained, but it took me time to
> find out about it. I do not find it all simple as workflows like that
> are not described anywhere.

Well, it is intuitive to use let instead of creating global
variables outside of the function. Isn't it? Well, to me it
is. lexical-scope is intuitive in that it makes the most sense
and is what you are used to from other languages, yeah, Lisp
wasn't my first language. I think Basic, then C?

> There are no big deals with dynamic variables as well, one
> can program for years without real problem.

That's right, I did so for many years without knowing about
this distinction at all, what I remember the transition to
lexical was done with only a few very minor changes. But then
I again, to me lexical is they way I always did it and it
makes the most sense, you enclose the code in blocks and
levels, and what you do, you don't want anything else to
interfere with it, and you don't want it to interfere with
anything else outside of it...

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

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