This is certainly better than the new operator but the parenthesis are a
bit strange.

Isn't the title 'default' special enough to not have the parenthesis?

If not, then I can certainly live with the parenthesis syntax better than a
new operator (though support in the syntax checkers will be most useful).

Thanks,

Trevor


On Mon, Aug 4, 2014 at 6:18 PM, Henrik Lindberg <
henrik.lindb...@cloudsmith.com> wrote:

> 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 puppet-dev+unsubscr...@googlegroups.com.
> 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.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaug...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

-- 
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 puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoUGYSACC5OS0vkyZVT6Yz6j2kgaGGphZmis90mWKSYKmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to