Tim Peters <tim.one@comcast.net>: > Lexical scoping doesn't come naturally except to > born Schemers, and indeed didn't come naturally to language designers either > (e.g., early LISPs all had dynamic scoping). I doubt whether the early designers of Lisp explicitly designed it to have dynamic scoping. Coming from lambda calculus, they were probably *thinking* of lexical scoping; it's just that the implementation they chose had some unfortunate side effects. So, I conjecture that the *idea* of lexical scoping comes naturally enough, but a correct implementation of it doesn't. :-) By the way, even in dynamically scoped Lisp, there's no equivalent of an UnboundLocalError -- to get a local variable at all, you have to bind some initial value to it. So, using Guido's terminology, early Lisp had dynamic scoping, but not dynamic lookup. Confused enough yet?-) Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4