[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lexical and Dynamic Scope
From: |
Emanuel Berg |
Subject: |
Re: Lexical and Dynamic Scope |
Date: |
Sun, 20 Jul 2014 21:47:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Robert Thorpe <rt@robertthorpeconsulting.com> writes:
> Stefan and the Emacs maintainers added lexical scope
> because it makes Emacs Lisp faster and it's simpler
> to understand.
OK, this post made it much clearer... So lexical scope
is like in C exactly as I thought.
Dynamic scope is when you actually don't have a scope
(?) - you have a stack of variable names and when you
refer (read) to a variable name you get the latest, and
that can be put there by whoever.
But: is the stack of names global? Howcome all the Lisp
don't get crazy from other Lisp changing "its"
variables? But come to think of it, I very seldom use
variables - I use `let's, and perhaps that is both a
shield from interference and doesn't change the global
name stack?
--
underground experts united
- Re: Lexical and Dynamic Scope,
Emanuel Berg <=