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

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

Re: Lexical vs. dynamic: small examples?


From: Emanuel Berg
Subject: Re: Lexical vs. dynamic: small examples?
Date: Sat, 14 Aug 2021 21:31:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

tomas wrote:

> The metaphor which, for me, did "click" was: lexical binding
> is a binding along "space", dynamic binding along "time".

Okay, but as for dynamic, isn't that the definition rather
than a metaphor?

"Lexical" refers to how the code is written - in particular
where a variable is defined and how it is scoped in the
source, when the source is compiled.

Lexical binding (or scope) could just as well be called
static scoping.

Dynamic or lexical binding answers the question how a variable
is looked up when it is referenced, i.e. called by its name.

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




reply via email to

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