On Wed, Sep 16, 2009 at 11:04 AM, Luke Kanies <[email protected]> wrote: > > On Sep 16, 2009, at 1:57 AM, R.I.Pienaar wrote: > >> >> hello, >> >> ----- "Luke Kanies" <[email protected]> wrote: >> >>>> Really if you use role classes you most certainly will not be >>>> including both so the silent failure you suggest just wont happen in >>> >>>> this specific case. >>> >>> The problem is that Puppet itself doesn't have any concept of 'role >>> classes', and people often encounter the problem that David >>> described. >>> >>> It might make sense to have a role class -- almost something like an >>> abstract base class or something, where a given host could only have >>> one of the subclasses -- but we don't have it right now. >>> >>> And even if we did, you still have a similar problem - there's a >>> potential for a significant separation of the setting from the usage >>> of that setting, and it's all pretty confusing. >> >> I wasn't suggesting this is something puppet should be aware of - >> the concept of a role class specifically - just saying its a common >> design pattern in use today and it will break for all those people >> if we do as discussed here. > > Well, the whole point in having a DSL is that you can add domain > features to the language, so if this is a commonly used feature I'd > like to add it to the language. > > But my point still stands - with the way they're implemented now, > while discipline allows you to avoid problems with dynamic scoping, > they still come up, and when they do they're difficult to track down. > > So the question is, can we provide the functionality you want while > making the whole thing more consistent and maintainable?
Personally, I only use the idiom R.I.Pienaar calls out *because* of the scoping issues. I'd be quite happy to be rid of it. In short, what DavidS says, +1 --Paul --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
