On Tue, Oct 12, 2010 at 2:17 PM, Markus Roberts <[email protected]> wrote: > >>> Hmm, the number of people chiming in on this topic is making me wonder >>> whether we are barking up the wrong tree with lexical scoping. If people >>> don't need for variables and resource defaults defined in a class to take >>> effect in contained classes, then there's no sense in our going to extra >>> work to support it. >>> >> >> Can we drop both lexical and dynamic scoping and still keep this property: >> >> >>> 1. Variables defined at toplevel can be seen inside classes. For >> >>> example: >> >>> $var = "value" >> >>> class foo { notify { $var: } } >> >>> include foo >> >>> >> > This is a good idea and should stay, short and long term. > > Q: Can we drop both lexical and dynamic scoping and still keep the property > "Variables defined at toplevel can be seen inside classes"? > > A: Yes. Globals don't require scoping. :P
Do we need scoping for inherited classes to inherit resource defaults and variables? -- nigel -- 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.
