Hi There!

I'm Dan Schlegel, an Associate Professor in the Computer Science Department at SUNY Oswego

Static vs Dynamic Scope

Static Scope in Python

Static vs Dynamic Scope in Common Lisp and Emacs Lisp

Common Lisp:

[Note that Common Lisp does have global variables with dynamic scope when defined with defvar or defparameter. Local dynamically scoped variables can be created and referred to with the rarely used special declaration.]

Emacs Lisp:

(The above examples were adapted from https://www.cse.buffalo.edu/~shapiro/Courses/CSE305/Notes/notes6.html)

Dynamic Scope in Bash

(The above adapted from https://gist.github.com/jonpryor/b44439f7f01ad2af73c0)

Static Scope in Clojure

Dynamic Scope in Clojure