Sorry for the vagueness. I was referring to Geppetto, the Vim plugin, etc...

Random parenthesis are something that I think will be often overlooked
without some help.

Thanks,

Trevor


On Mon, Aug 4, 2014 at 7:16 PM, Henrik Lindberg <
[email protected]> wrote:

> On 2014-05-08 1:08, Trevor Vaughan wrote:
>
>> 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?
>>
>>  The functionality is not limited to the default title, and a literal
> default is not a special expression so the grammar has no special
> knowledge. It is basically:
>
> Body : expression ':' attribute_operations ... ;
>
> i.e. you can use it for a titled resource as well:
>
> file { '/tmp/foo': ($hash) }
>
>
>
>  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).
>>
>>
> You mean in puppet parser validate? Or where? (You should get static
> validation of this - it cannot validate that the expression will evaluate
> to a valid hash though, that is not known until you actually run the code).
> But maybe you meant something else?
>
> Regards
> - henrik
>
>  Thanks,
>>
>> Trevor
>>
>>
>> On Mon, Aug 4, 2014 at 6:18 PM, Henrik Lindberg
>> <[email protected] <mailto:[email protected]>>
>>
>> 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/
>>
>>     <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+unsubscribe@__googlegroups.com
>>     <mailto:puppet-dev%[email protected]>.
>>
>>     To view this discussion on the web visit
>>     https://groups.google.com/d/__msgid/puppet-dev/lrp0s2%24c09%
>> __241%40ger.gmane.org
>>     <https://groups.google.com/d/msgid/puppet-dev/lrp0s2%24c09%
>> 241%40ger.gmane.org>.
>>
>>     For more options, visit https://groups.google.com/d/__optout
>>     <https://groups.google.com/d/optout>.
>>
>>
>>
>>
>>
>> --
>> Trevor Vaughan
>> Vice President, Onyx Point, Inc
>> (410) 541-6699
>> [email protected] <mailto:[email protected]>
>>
>>
>> -- 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 [email protected]
>> <mailto:[email protected]>.
>>
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-dev/CANs%
>> 2BFoUGYSACC5OS0vkyZVT6Yz6j2kgaGGphZmis90mWKSYKmA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-dev/CANs%
>> 2BFoUGYSACC5OS0vkyZVT6Yz6j2kgaGGphZmis90mWKSYKmA%40mail.
>> gmail.com?utm_medium=email&utm_source=footer>.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> 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/lrp48o%24i8b%241%40ger.gmane.org.
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]

-- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoXCc2QWmPcx73DMFPJMAFq-wDT3bJFCQqMsuJZU9VBj6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to