3 ms·
Dynamic scope https://en.m.wikipedia.org/wiki/Scope_(computer_science)#Dynamic_scope https://en.m.wikipedia.org/wiki/Scope_(computer_science)#Dyn...
by amitport 5y ago
Dynamic scope
https://en.m.wikipedia.org/wiki/Scope_(computer_science)#Dynamic_scope https://en.m.wikipedia.org/wiki/Scope_(computer_science)#Dyn...
- _ph_ 5y agoDynamic scope can be great, if used wisely. Of course, by default, you don't want dynamic scope for your variables. But to be able, as an exception, to declare dynamically scoped variables is exactly how you want to handle global values. Common Lisp handles this nicely.
- kazinator 5y agoCommon Lisp doesn't handle this at all in the way you describe. It does not have global lexical variables which you can opt-in to dynamic scope. It has only dynamically scoped globals. (Implementations may provide global lexicals as an extension.)