[plt-scheme] let vs parameterize?

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Apr 16 23:24:39 EDT 2007

On 4/16/07, Jakub Piotr Cłapa <jpc at pld-linux.org> wrote:
> Robby Findler wrote:
> > Another difference between parameters and fluid-let: in a fluid-let
> > the values are not thread local, but in a parameter they are.
>
> That's the main reason I was asking about this. R5RS doesn't mention
> threads but from the intuitive point of view making fluid-let
> thread-local seems to be a natural extension (it not, than fluid-let
> becomes pretty much useless in multi threaded programs). On the other
> hand it certainly would mix the semantics. Thanks for the clarification.
>
> btw. I have another question:
> fluid-let only affects code that uses the same binding of the variable.
> So if I declare two modules with a private variable of same name in both
> than fluid-letting one will only affect the code from the same module
> (so fluid-let respects the scoping of the original binding). Parameters
> also respect these rules, don't they?

Parameters are explicitly passed around, unlike the state in a
variable binding, so I'm not sure how to answer that question.

Perhaps experimentation with some examples will clear things up? If
not, how about posting the confusing example here and we'll help?

Robby

Posted on the users mailing list.