Thanks Robby/Carl (and Eric for answering privately) - <br><br>here's a related question: Does parameterize automatically uses a custodian (e.g. current-custodian) to manage resources or custodians have to be used explicitly?
<br><br><div><span class="gmail_quote">On 4/16/07, <b class="gmail_sendername">Robby Findler</b> <<a href="mailto:robby@cs.uchicago.edu">robby@cs.uchicago.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Another difference between parameters and fluid-let: in a fluid-let<br>the values are not thread local, but in a parameter they are.<br><br>Robby<br><br>On 4/16/07, Carl Eastlund <<a href="mailto:cce@ccs.neu.edu">cce@ccs.neu.edu
</a>> wrote:<br>> On 4/16/07, Yin-So Chen <<a href="mailto:yinso.chen@gmail.com">yinso.chen@gmail.com</a>> wrote:<br>> > What is the difference between using let vs parameterize?<br>><br>> Let operates on bindings. It creates a new name and binds it to a
<br>> value. This affects code directly within the let-body that refers to<br>> the same name, providing it is not bound again ("shadowed") inside the<br>> let.<br>><br>> Parameterize operates on parameters, which are values. It takes an
<br>> existing parameter and makes it return a different value during the<br>> execution of the body of the parameterize. This affects any code<br>> called during that execution, even if it's in a different function,
<br>> module, whatever, so long as it uses the same parameter value.<br>><br>> > It seems that one can use let to manipulate parameter objects (at least<br>> > scheme doesn't forbid it) - any issues with using it?
<br>><br>> Let does not manipulate values at all. It just binds names to<br>> existing values. It never changes values or their contents.<br>><br>> > How do I know whether or not something is a parameter versus a variable?
<br>><br>> You could ask the same thing about numbers vs variables, or strings vs<br>> variables. A variable is a name for a value. That value might be<br>> anything: number, string, list, parameter, etc. But you should be
<br>> careful never to confuse the name with what it refers to.<br>><br>> And in response to the followup email: fluid-let, like let, operates<br>> on variables (names), not values. Hence it would not be an<br>
> "extension" to make it work on parameters. If you give the name of a<br>> parameter to fluid-let, it will change which parameter that name<br>> refers to, not the contents of the current parameter.<br>
><br>> --<br>> Carl Eastlund<br>> _________________________________________________<br>> For list-related administrative tasks:<br>> <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme
</a><br>><br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.yinsochen.com">http://www.yinsochen.com</a><br>...continuous learning...