On 30 Okt., 22:32, Luke Kanies <[EMAIL PROTECTED]> wrote:
> On Oct 10, 2008, at 11:12 PM, jerico wrote:
>
>
>
> > Hi Puppet Developers!
>
> > I have some real practical problems with the maintainability and
> > readability of puppet code. Here are some thoughts about (backwards
> > compatible) language syntax additions that IMO could greatly help to
> > clean up puppet code.
>
> For the record, changes that require deprecating existing syntax
> doesn't really qualify as backward compatible. :)
>
>
>
>
>
> > I have to say beforehand that I'm not able to implement my own
> > propositions (ouhh). But maybe some puppet architect finds my ideas
> > interesting anyway more as a kind of teaser...
>
> >http://projects.reductivelabs.com/issues/show/1645
>
> > Here some superficial discussion I had on #puppet to validate the
> > idea:
>
> > [00:11]    fujin: jerico: considering that your changes would break
> > backwards compatibility, and require a large number of users' manifest
> > rewrites.. it'd probably only ever be changed with a toggle option
> > [00:11]    fujin: jerico: what problems do your changes fix? ;}
> > ...
> > [00:23]    jerico: fujin: Why would it break backwards compatibility? I
> > consider backwards compatibility in my feature request.
> > [00:24]    jerico: fujin: The benefits are that you could avoid global
> > variables (which you cannot currently if you use classes with
> > templates in them).
> > [00:25]    jerico: fujin: I think it is out of question that global
> > variables are a very bad idea. They are against the most basic design
> > principles.
>
> Puppet will always have something resembling global attributes -- at
> the least, client facts are global.
>
> The key here is that these global variables aren't writable, which
> completely changes whether they're such a bad idea.  They're much more
> like global constants than global variables.
>
>
>
> > [00:25]    jerico: fujin: You could use definitions instead. But they are
> > not meant for singleton use and they do not let you define instance
> > variables as classes do.
> > [00:26]    jerico: fujin: I also think that a merged type would be more
> > intuitive for newcomers. (Specially the host of us who have an OO
> > background).
>
> I.e., more useful to programmers, but not necessarily so much for
> sysadmins.
>
> It's true that you're not the first person to make this request or to
> find the distinction either confusing or arbitrary, but don't discount
> the fact that Puppet isn't written by and for developers, it's for
> sysadmins, surprisingly few of whom have much OO experience.
>

So taking that fact into account means one should refrain from using
puppet for more complex administration work?

Isn't there a possibility to somehow please both sides?

I'm having the same problem as I'm establishing a groupware setup with
puppet and I have no reasonable solution for keeping track of all the
variables so far.

Cheers,

Gunnar

>
>
>
>
> > [00:27]    jerico: fujin: These are quite some benefits, don't you think
> > so? And as I think that you can have all this with full backwards
> > compat... I thought it would be a good idea.
> > ...
> > [00:34]    fujin: global variables are one of the very basic design
> > prinipals relied upon by many external node tools
> > [00:34]    fujin: you're kinda throwing some heavy OO ideas into a
> > declarative, imperative manifest syntax
> > ...
> > [00:35]    jamesturnbull: jerico: I'm thinking about it - not sure I am
> > sold
> > [00:35]    jamesturnbull: jerico: but lak is probably the best one to
> > discuss it with -- and on the -dev list
> > [00:36]    fujin: mm, global variables may be frowned upon in your OO
> > language of choice, but here they are very useful for abstraction
> > [00:36]    fujin: It's top-scope, always inherited imperation
> > [00:36]    fujin: (imperation a word?)
>
> > These were the basic arguments I think. The rest was a little
> > repetitive.
>
> --
> A government that robs Peter to pay Paul can always depend on the
> support of Paul. -- George Bernard Shaw
> ---------------------------------------------------------------------
> Luke Kanies |http://reductivelabs.com|http://madstop.com
--~--~---------~--~----~------------~-------~--~----~
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