Jim Diamond <Jim.Diamond@deletethis.AcadiaU.ca>
writes:
Really? Are there well-agreed-upon studies showing
those things? Or are they your opinion?
It strikes me that lexical scoping is easier to
implement for compiled languages (that is an "off
the cuff" comment from someone (me) with basic
knowledge of compiler construction). But if lexical
scoping is "more natural", is that because more
people were "brought up" with lexically-scoped
languages than dynamically-scoped languages?
This discussion is much easier to have if that
confusing terminology is dropped for a second and we
instead study the simple example of a `let' form:
(let ((scratch-buffer "*scratch*"))
(when (bufferp scratch-buffer)
(kill-buffer scratch-buffer) ))
Here we have one piece of data which is used twice, so
that data is named and when it is used it is
indirectly refered to.
In this example, what is natural to me? Answer:
I don't expect `let' to affect any other code than the
code in the `let' itself! And this is "lexical
scoping".