4 ms·
Check whether you get the outer scope's value back when the inner scope terminates.
by eschutte2 8y ago
Check whether you get the outer scope's value back when the inner scope terminates.
- kqr 8y agoWith no scoping you don't, because there is no inner scope. With dynamic scoping you also don't, because there is no lexical scope. What am I misunderstanding?
- eschutte2 8y agoI don't understand your point 2. Here's an example of what I meant: > (defvar somevar 3) > (defun printvar () (format t "somevar is ~D~%" somevar)) > (printvar) somevar is 3 > (let ((somevar 5)) (printvar)) somevar is 5 > (printvar) somevar is 3 If you only have global variables, you wouldn't get 3 back the third time, right?
- kqr 8y agoYES!! Thank you! This made it click with me, finally. I can't yet put it into words nicely, but I do have an intuition for the concept now.