Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Dynamic scoping

Name: Anonymous 2011-11-11 4:23

How, when, where and why?

Name: Anonymous 2011-11-11 4:30

Name: Anonymous 2011-11-11 4:31

bash scopes loops dynamically. this is frustrating

Name: Anonymous 2011-11-11 4:49

>>2
Okay, I'll ask it differently : When is the last time you have used dynamic scoping and how did you use it?

Name: Anonymous 2011-11-11 6:25

ONE WORD THE FORCED NEWLISPATION OF CODE THREAD OVER

Name: Anonymous 2011-11-11 15:47

Aspect Oriented Programming (ASP)

Name: Anonymous 2011-11-11 16:16

>>4
I use it in Common Lisp for parametrizing stuff (instead of using nasty globals like people do in C), it lets you override settings or various things in the scope of whatever code you want and doesn't break your other code. A similar use is when you want to change the behavior of some thread or of some specific function and all the functions called from that function within the scope of a particular call and not break everything else - it even works properly with threads (if supported) and conditions (unwinds properly).
I also use it as a more advanced technique in code generated by some macros (such as a locally special gensyms), but such (ab)uses are outside the scope of this thread (using dynamic scope on some variable is like treating the variable's value cell as a stack, but this is done transparently and safely for you by the implementation).

Name: Anonymous 2011-11-11 16:24

>>6
asp? more like python!

Name: Anonymous 2011-11-11 19:28

Perl

Name: Anonymous 2011-11-11 22:04

It you want local variables in postscript, the closest thing you can get is dynamic scope, by pushing and popping dictionaries from a built in stack.

Name: Anonymous 2011-11-12 13:04

>>10
dubsgusting

Don't change these.
Name: Email:
Entire Thread Thread List