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

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

Re: Mutation - do you understand it really?


From: Michael Heerdegen
Subject: Re: Mutation - do you understand it really?
Date: Sat, 10 Dec 2022 19:29:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> Immutable variables are just a lot better behaved (and easier to work
> with for the compiler, which is why GCC/LLVM/... use an SSA conversion
> to replace those nasty mutable variables with immutable ones).

The original question used `setq'.  I presented it to a friend that
knows lambda calculus and Haskell very well, but Lisp not at all.  When
he asked "what does this setq do" and I gave an answer he was shocked
that these bindings are mutual in Lisp and his reaction was like
"WTF?...Ok, then...".

But mutable variable bindings are a legitimate aspect of semantics of
closures in Lisp - I hope I didn't scare anybody.  When there is an
intention then it is to hint at pitfalls so that people know them before
they cause trouble.

Michael.





reply via email to

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