On Tue, Jul 09, 2013 at 09:23:39AM -0700, jcbollinger wrote:
> 
> 
> On Monday, July 8, 2013 11:02:25 AM UTC-5, Ashley Penney wrote:
> >
> >
> > This is definitely something we want to do and need to do.  I've been a 
> > little hesitant to wade down into the whole "these are the specific 
> > parameter names we want to use" and building out a huge set of guidelines, 
> > but I do have a straightforward question for the list along these lines:
> >
> > We're refactoring the ntp module to try and be a little bit of a better 
> > design rather than one giant class.  We've been having some discussions in 
> > the PR about the right way to name the following options:
> >
> > manage_service
> > ensure_package
> > package_enable
> >
> > I was leaning towards:
> >
> > ensure_package
> > enable_package
> > ensure_service.
> >
> > But it's been proposed that:
> >
> > service_ensure
> > package_enable
> >
> > Makes better sense in terms of being able to scan for things.
> >
> > Does anyone reading this have strong preferences either way?  Now is the 
> > time for us to slowly start renaming parameters across the modules as we 
> > work on bringing in PRs, so speak up now. :)
> >


> 
> 
> In an abstract sense, I think I prefer <component>_ensure over 
> ensure_<component>, on the principle that the most-significant name 
> component should come first.  It's not really about scanning for things for 
> me, but rather about grouping related things together.  That carries 
> advantages for visual scanning, but the grouping aspect is more fundamental.

+1

> 
> In a more concrete sense, if you are naming parameters of a class, then the 
> datum we abstractly refer to as <component>_ensure might more sensibly be 
> named something else in that context.  For example, in a class 
> ntp::service, I would certainly choose the parameter name "ensure" over 
> "service_ensure".  There is therefore some dependency on module structure 
> and intended use.

+1

NB: I can't remember the last time I agreed with someone on everything that
he says.

-- 
Nikola

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to