On 01/07/2011 07:49 PM, dingus9 wrote:
> 
> I would like to see a dedicated group for this too. I have a few
> opinions on the matter of language syntax and semantics.
> 
> My main frustration is the matter of slightly different methods for
> declaring defines, nodes and classes.
> 
> Take these four examples a node, a define and the two class include/
> initialize methods.
> 
> # A node
> node uniquehostname {
>         #do stuff
>     }
> 
> # a define
> mydefine {'uniqueName':
>     #do some stuff that can be run multiple times
>     param => 'val',
> }
> 
> #Comments around 'uniqueclassname' may be used or ommited here
> class {uniqueclassname:
>     param => 'val', #note comments on 'param' would mess it up here...
> lame
>     }
> 
> #but comments are required here for 'module::class' syntax, else it
> throws a syntax error
> class {'module::uniqueclassname':
>     param => 'val',
> }
> 
> #and finally
> include uniqueclassname
> 
> 
> I would like to see all syntax for instantiating a class define or
> node be the same... an example:
> 
> node {'unquehostname': }
> 
> mydefine {'uniquedefinename': }
> 
> myclass {'module::classname': }
> 
> ####
> or if you prefer a more explicit syntax:
> 
> 
> node {'unquehostname': }
> 
> mydefine {'uniquedefinename': }
> 
> class {'module::classname': }
> 
> Thoughts?

Nick,

you're confusing me. You keep writing about "comments" where (hopefully)
you mean "quotes"!

Please note that "node { }" is always a declaration. Such is "class {
}". If I read you right, you'd like instanciation to work using
class { "name": }. But how can the parser tell that you aren't creating
a new class by the name of "<current_scope>::name"?

Furthermore, it would be downright confusing to be required to write
node { 'dbserver1':
  include defaults
  include mail::server
  include mysql::server
}
Because declaring a node/class/define is conceptually different from
instanciating a class or define. Both types of block should not look alike.

I find it desirable to allow the negligience of quotes. It's OK when I
have to quote
node "my.fqdn.server.com" and need not quote
node projecta-db1.

Quoting parameter names is a Bad Idea. But for those that like typing
absolutely unnecessary quote characters in almost each single line of
each single manifest, it may as well be allowed as far as I'm concerned,
but it should not be a requirement.

Regards,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to