On Sat, 2010-02-20 at 12:33 -0800, Markus Roberts wrote:
> +x, for some as yet undetermined value of x.

Let's hope x is more 1 than 0, then :-)

> This is a clear and simple solution to the problem in the current
> (0.25.x) code base and on that basis I'd +1 it with no hesitation.  On
> the other hand, it's not clear (to me, at the present moment) how it
> would map to the bleeding edge (testing). 

Yes, that was what I was thinking too.

> At the puppet-language level, I'm thinking about cases such as:
> 
> notice $foo_info
> if $var =~ /foo([a-z]+)/ {
>         $foo_info = "$1 found after foo."
>     } else {
>         $foo_info = "there's no foo in $var."
> }
> 
> The problem is that the ephemeral stack adds another layer of
> mutability (or, considering that the existing code isn't exactly well
> behaved, you might say that it rubs our noses in an existing but
> heretofore implicit layer of mutability). 

Correct.

> To resolve the $1 in the string interpolation in the then-clause when
> computing the future of $foo_info's value we need more information
> than we presently have means of tracking without a hairy and inelegant
> proliferation of scope like objects, the vast majority of which will
> never be needed.

I won't pretend I know how your future patch is working (BTW did you
publish it on this list?). The only way I can think of is to make sure
the ephemeral stack is immutable (which is not the case right now, but
can be done easily since there is only two places where it is mutated),
and attach it to the current future when needed (that looks like it is
the gory details).

> This is not to say that there isn't a clean mapping, just that I
> haven't seen it yet; in general I think the patch is a reasonable
> solution to the scoping of ephemerals in 0.25.x, and it's just a
> matter of watching the details as we transition.

Yes. I'll checkout testing and have a look to the future+stringinterp
patch to see if I can come with something.
-- 
Brice Figureau
Follow the latest Puppet Community evolutions on www.planetpuppet.org!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to