[gambit-list] Two basic questions regarding the use of make-parameter and parameterize.
patrickli.2001 at gmail.com
Sun Nov 3 00:27:10 EDT 2013
I am interested in the design choices surrounding SRFI-39: the
make-parameter function and parameterize special form. There are
specifically 2 issues that I don't understand.
1) The parameter is currently a function that yields the value its
holding when it is called. What is the purpose of forcing the user to
"dereference" the parameter in this way? This is constrast to
implementing dynamic variables using a mutable global variable, and
having parameterize directly mutate the global variable within a
2) Is there a way to get a closure to close over the dynamic
environment? The use case is that I want to use dynamic variables
*purely* to avoid having to pass commonly used arguments
explicitly. Thus I am using the dynamic variable as an "implicitly"
passed argument. And in such a case, I would like closures to refer to
the value of the dynamic variable at the time of closure creation.
Thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gambit-list