5 ms·
The statement may not be nonsense, but it's certainly not at a level of detail required to be genuinely true. Variables do always have the same value and never
by tel 12y ago
The statement may not be nonsense, but it's certainly not at a level of detail required to be genuinely true.
Variables do always have the same value and never change in Haskell. They represent constant abstracted unknowns. That said, a lambda binder which introduces a variable can be applied repeatedly and therefore each independent time it's applied the body of it, where the abstraction occurs, is now understood to operate with a new value for that variable.
That's very different from change, though. The semantics of beta reduction clearly don't allow for change---merely substitution. The statics of it clearly demonstrate that even substitution isn't doing anything new---merely replacing like for like.
Even when your Haskell program responds to outside interaction---clearly, this is dynamic information, right?---it's still the same static artifact which is doing it. The variables at this point are all erased. It's merely the semantics of your program under outside intervention.