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: Emanuel Berg
Subject: Re: Mutation - do you understand it really?
Date: Wed, 18 Jan 2023 11:58:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Heerdegen wrote:

>> 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.

A mathematician who has learned one computer language
(Haskell) and pretends to be unable to/takes pride in not ever
doing it again?

> When he asked "what does this setq do" and I gave an answer
> he was shocked

Okay, but what did you say then?

> that these bindings are mutual in Lisp and his reaction was
> like "WTF?...Ok, then...".

First the variables are mutable, now the bindings are
mutual ...

Symbols can have values, that value can change so it's
mutable, but the symbol can be assigned something else (or
nothing), so that's mutable as well. It's all mutable, that's
what you mean?

So when you compile you don't do that, instead generate a new
one for each time the binding is reassociated?

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




reply via email to

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