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

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

Re: dynamic and lexical scope, attempted summary with example


From: Michael Heerdegen
Subject: Re: dynamic and lexical scope, attempted summary with example
Date: Mon, 21 Jul 2014 11:23:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> As always, I think it is easier to discuss in terms of
> an example...

Right, but I think in this case, it's not a good idea to learn that in
passing.  I really recommend to read some literature about it - this
isn't trivial.  Both kinds of scope have their rights to exist and their
use cases.

When I first heard about scope, I though "This does only matter in
situations I avoid".  But lexical scope in a functional language
is a basis of lots of advanced programming techniques.  OTOH, dynamic
scope is as well imperative to programming in LISP.

It's explained e.g. here:

    http://www.paulgraham.com/onlisp.html

There are books easier to read than this, but the chapter about scope is
well understandable without reading the rest, I think.




reply via email to

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