Scheme and Common Lisp which are the most modern popular LISP dialects use lexical scoping, and since Perl 5 adopted it, it has been become very popular and mainstream, outside Lisp.
The default localization of values in Park would be lexical. However, having used Perl 5's local
, I am aware of several good uses for dynamic scoping in a mostly lexical scoping language. So, there will be a way to localise variables dynamically in Park.
One killer feature like that would be a way to do something like:
(do-using-local-state ( (set a "hello") (my-func-with-side-effects) ) ( # Rest of code here. ) ) # a is no longer hello and (my-func-with-side-effects) effects' are reversed.
Of course, this feature is still pie-in-the-sky, and I'm waiting for a good analysis of complexity and/or efficient working implementation.