On 2014-04-08 20:35, Trevor Vaughan wrote:
So, I'm chiming in to say that I completely agree with Reid and Ashley.

As an end user, I want to hand off code that is clear and relatively
easy to read. I definitely do not want magic symbols (or I would have
stuck with PERL).

I'm OK with all of the concepts proposed but I would like more verbosity
and clarity as opposed to more 'elegance' and mystery.


So, to summarize: The use of * => as an operator is not liked but the concept of being able to set attributes from a hash is. Unfortunately, it is not possible to directly allow an expression at the position in question, there must be a syntactical marker.

As pointed out earlier, the * => was thought to read as "any_attribute => from_these_values", but I totally grok if people have an allergic reaction.

We can do this though:

file { default: ($hash) }

This works because it is impossible to have an attribute name in parentheses.

In use:

file (
  default   : ($my_file_defaults + { mode => '0666' });
  '/tmp/foo': ;
  '/tmp/bar': ;
}

Is that better? No new operator, but you have to use parentheses around the expression.

We can naturally also revert the functionality, but it seems it is liked conceptually.

- henrik

--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/lrp0s2%24c09%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to