[Puppet-dev] Re: The 4x scope

2014-03-19 Thread Henrik Lindberg
On 2014-19-03 18:20, Erik Dalén wrote: On 19 Mar 2014 18:11, "Henrik Lindberg" mailto:henrik.lindb...@cloudsmith.com>> wrote: > > On 2014-19-03 17:26, Erik Dalén wrote: >> >> >> Also IMO it would be really good if support for doing the stuff in >> https://tickets.puppetlabs.com/browse/PUP-

Re: [Puppet-dev] Re: The 4x scope

2014-03-19 Thread Erik Dalén
On 19 Mar 2014 18:11, "Henrik Lindberg" wrote: > > On 2014-19-03 17:26, Erik Dalén wrote: >> >> >> Also IMO it would be really good if support for doing the stuff in >> https://tickets.puppetlabs.com/browse/PUP-1985 could be added. Basing >> default values of parameters on the values of earlier pa

[Puppet-dev] Re: The 4x scope

2014-03-19 Thread Henrik Lindberg
On 2014-19-03 17:26, Erik Dalén wrote: Also IMO it would be really good if support for doing the stuff in https://tickets.puppetlabs.com/browse/PUP-1985 could be added. Basing default values of parameters on the values of earlier parameters. Atm you are forced to do the ugly kind of stuff that

[Puppet-dev] Re: The 4x scope

2014-03-17 Thread Henrik Lindberg
Thanks John for taking the time to read and comment in detail - I think I get what you are proposing, and I think that may work. Have to read the entire thing through a couple of time more before responding. - henrik On 2014-17-03 17:22, John Bollinger wrote: On Friday, March 14, 2014 10:4

[Puppet-dev] Re: The 4x scope

2014-03-17 Thread Henrik Lindberg
On 2014-17-03 14:19, John Bollinger wrote: On Friday, March 14, 2014 10:48:31 PM UTC-5, henrik lindberg wrote: [I wrote:] > Such as about scoping function names > so that different environments can bind different implementations to the > same name, maybe. > T

[Puppet-dev] Re: The 4x scope

2014-03-17 Thread Henrik Lindberg
On 2014-17-03 10:07, Erik Dalén wrote: On 14 March 2014 17:00, Henrik Lindberg mailto:henrik.lindb...@cloudsmith.com>> wrote: On 2014-14-03 11:48, Erik Dalén wrote: Not terribly important, but are there any thoughts on making it so you can order variables any way

Re: [Puppet-dev] Re: The 4x scope

2014-03-17 Thread Jeff McCune
VM                               -Jeff On Fri, Mar 14, 2014 at 8:48 PM, Henrik Lindberg wrote: > I have a long and rambling response written in several installments > between meetings - so I apologize if it is not completely consistent... > To summarize the proposal for 4x (star

Re: [Puppet-dev] Re: The 4x scope

2014-03-17 Thread Felix Frank
On 03/17/2014 05:25 PM, John Bollinger wrote: > https://jira.puppetlabs.com/browse/PUP-731 > ? > > > > Yes, though the issue description seems to focus on types rather than > functions. The title mentions functions, and the issue is basically

Re: [Puppet-dev] Re: The 4x scope

2014-03-17 Thread John Bollinger
On Monday, March 17, 2014 8:36:25 AM UTC-5, James Sweeny wrote: > > > > > On Mon, Mar 17, 2014 at 9:19 AM, John Bollinger > > > wrote: > >> >> I love the idea of qualified function name, but that's not what I was >> talking about. Puppet currently suffers from a different kind of scoping >>

[Puppet-dev] Re: The 4x scope

2014-03-17 Thread John Bollinger
On Friday, March 14, 2014 10:48:31 PM UTC-5, henrik lindberg wrote: > > I have a long and rambling response written in several installments > between meetings - so I apologize if it is not completely consistent... > > To summarize the proposal for 4x (starting out with the cleanest most > stri

Re: [Puppet-dev] Re: The 4x scope

2014-03-17 Thread James Sweeny
On Mon, Mar 17, 2014 at 9:19 AM, John Bollinger wrote: > > I love the idea of qualified function name, but that's not what I was > talking about. Puppet currently suffers from a different kind of scoping > problem in that different versions of the same function, declared with the > same name (e.g

[Puppet-dev] Re: The 4x scope

2014-03-17 Thread John Bollinger
On Friday, March 14, 2014 10:48:31 PM UTC-5, henrik lindberg wrote: > > [I wrote:] > > Such as about scoping function names > > so that different environments can bind different implementations to the > > same name, maybe. > > > > There will be support for scoping function names. i.e. you ca

Re: [Puppet-dev] Re: The 4x scope

2014-03-17 Thread Erik Dalén
On 14 March 2014 17:00, Henrik Lindberg wrote: > On 2014-14-03 11:48, Erik Dalén wrote: > >> Not terribly important, but are there any thoughts on making it so you >> can order variables any way you like in the manifest? They are immutable >> anyway, so these two examples should be equivalent: >>

Re: [Puppet-dev] Re: The 4x scope

2014-03-16 Thread David Schmitt
On 2014-03-16 01:36, Henrik Lindberg wrote: Sure experienced programmers or people who are more familiar with how the scoping model in Puppet works will be able to use this to their advantage but the code that's produced and potentially released might not be easy to understand for others. Yeah

[Puppet-dev] Re: The 4x scope

2014-03-15 Thread Henrik Lindberg
On 2014-15-03 16:54, Daniele Sluijters wrote: Hi, I like just about everything in the proposal but I have my doubts about this: > The class scope looks up unqualified variables in the class itself, if > not found there, it continues up the parent chain of scopes. If the > class inherits from

[Puppet-dev] Re: The 4x scope

2014-03-15 Thread Daniele Sluijters
Hi, I like just about everything in the proposal but I have my doubts about this: > The class scope looks up unqualified variables in the class itself, if > not found there, it continues up the parent chain of scopes. If the > class inherits from another, then, the parent scope is one that >

[Puppet-dev] Re: The 4x scope

2014-03-14 Thread Henrik Lindberg
I have a long and rambling response written in several installments between meetings - so I apologize if it is not completely consistent... To summarize the proposal for 4x (starting out with the cleanest most strict to see what this means in practice): 1. unqualified variable references is "

[Puppet-dev] Re: The 4x scope

2014-03-14 Thread John Bollinger
On Thursday, March 13, 2014 7:19:22 PM UTC-5, henrik lindberg wrote: > > > We also have to decide if any of the relative name-space functionality > should remain (i.e. reference to x::y is relative to potentially a series > of > other name spaces ("dynamic scoping"), or if it is always a globa

Re: [Puppet-dev] Re: The 4x scope

2014-03-14 Thread David Schmitt
On 2014-03-14 17:00, Henrik Lindberg wrote: On 2014-14-03 11:48, Erik Dalén wrote: Not terribly important, but are there any thoughts on making it so you can order variables any way you like in the manifest? They are immutable anyway, so these two examples should be equivalent: I am also not

[Puppet-dev] Re: The 4x scope

2014-03-14 Thread Henrik Lindberg
On 2014-14-03 11:48, Erik Dalén wrote: Not terribly important, but are there any thoughts on making it so you can order variables any way you like in the manifest? They are immutable anyway, so these two examples should be equivalent: $a=1 $b=$a+2 or $b=$a+2 $a=1 You can put resources in any

[Puppet-dev] Re: The 4x scope

2014-03-13 Thread Henrik Lindberg
On 2014-14-03 3:25, Trevor Vaughan wrote: So, it sounds like we're getting everything we wanted! That's great to hear. So, I suppose that I should have been clearer. We are starting to label all variables and class calls with $::name to ensure that the full removal of dynamic scoping works prope

Re: [Puppet-dev] Re: The 4x scope

2014-03-13 Thread Trevor Vaughan
So, it sounds like we're getting everything we wanted! That's great to hear. So, I suppose that I should have been clearer. We are starting to label all variables and class calls with $::name to ensure that the full removal of dynamic scoping works properly. While more verbose, I find it to be muc

[Puppet-dev] Re: The 4x scope

2014-03-13 Thread Henrik Lindberg
On 2014-14-03 1:59, Trevor Vaughan wrote: Henrik, All of this looks great to me. However, I was asked by someone recently if the language had the concept of a private class scope. Not yet. We're seeing more patterns in the wild where people are creating classes that are only meant to be used