Hello !

On Friday, June 28, 2013 6:16:42 PM UTC+2, Andy Parker wrote:
>
>
> I'm taking this to mean that you find that iteration constructs and new 
> structures move the language away from simplicity and their utility does 
> not offset that loss of simplicity. Is that right?
>

I already posted on this subject, but I guess my post made no sense at all 
:) I do like the explicit support for loop-like logic, but I believe the 
ruby-mimicking is not a great idea. Each (also known as foreach) and 
collect are basically the same thing : they let you write arbitrary 
statements in the loop and both return something, meaning they can both be 
used in "rvalues" or "statement" context. I believe this violates 
http://docs.puppetlabs.com/puppet/3/reference/lang_functions.html#behavior. 
I didn't test this for the other functions, but I believe they act the 
same. "Each" should not return anything (which would result in an error 
when compiling catalogs), and collect should only accept expressions in its 
body.

Also I am unsure of the value of "slice", "reduce" and "reject", but this 
is just a matter of personal taste.

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to