3 ms·
No, dynamic scope and global scope are two different things...and can exist within a language alongside lexical scope. Common Lisp (unsurprisingly given its de
by brudgers 9y ago
No, dynamic scope and global scope are two different things...and can exist within a language alongside lexical scope. Common Lisp (unsurprisingly given its development as a consensus standard among working programmers and Lisp system vendors) is an example. The macros defvar and defparameter [1] accompany lexical scope (and package/namespace scope). For my money, Common Lisp is a great language to study when trying to get a handle on language design because it does so much. YMMV.
http://www.lispworks.com/documentation/HyperSpec/Body/m_defpar.htm http://www.lispworks.com/documentation/HyperSpec/Body/m_defp...