I don't think we have the luxury of backing them out any more; and to be honest I think that these functions here are mostly OK. Map & filter will be fine. People will struggle with reduce and slice and they probably won't get used much.
I have two real concerns here. Clearly I'm concerned about language complexity, since one of the major questions I get asked in training is why we can't use a case statement inside a resource declaration. My bigger concern, though, is that the question is being asked here, where we're all the top 1% of the top 1%. This is a self-selected list of very advanced users who all find these functions simple and readable. We have needs and requirements that just don't align with the bulk of our userbase. Ashley said it rather well the other day when he said that having a DSL wasn't a benefit--but having a readable DSL was. The more we add to the language, the less true that becomes, and then there's less of a reason to choose Puppet. I don't want to inhibit the language development, I just want that to be the number one priority in regards to any new functionality and nobody in here, including myself, is really able to identify the end-user impact of these changes. On Wednesday, August 6, 2014 2:46:36 AM UTC-7, Erik Dalén wrote: > > I don't think they are too much or that any should be left out. > I suppose all of them could be emulated with just the reduce function, so > if anything that one should be kept. But it is just cumbersome and makes > the code less clear to do a filter in a reduce function. > > > On 6 August 2014 03:01, Andy Parker <an...@puppetlabs.com <javascript:>> > wrote: > >> It has been brought to my attention that there are a number of the >> functions that were added as part of the "iteration in the puppet language" >> work that there isn't any kind of general agreement on their value. >> >> I think the list of functions in question is: >> >> * map >> * reduce >> * filter >> * slice >> >> The use cases for each of these come down to various forms of data >> manipulation. Map, for instance, can be used to place a prefix or suffix on >> some, or all of the elements of a list. Filter is used when only a subset >> of elements is wanted. Slice is to produce groupings of elements in a list. >> Reduce is the oddest one of the bunch, it is the actual "foreach" loop that >> everyone is familiar with from languages with mutable variables, but in a >> very different form. >> >> Are these functions too much? Should they be left out? >> >> -- >> Andrew Parker >> a...@puppetlabs.com <javascript:> >> Freenode: zaphod42 >> Twitter: @aparker42 >> Software Developer >> >> *Join us at PuppetConf 2014 <http://www.puppetconf.com/>, September >> 22-24 in San Francisco* >> *Register by May 30th to take advantage of the Early Adopter discount >> <http://links.puppetlabs.com/puppetconf-early-adopter> **—**save $349!* >> >> -- >> 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+...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-dev/CANhgQXvG8Xkv9d4tDBMWeJvLk%3DffdmaCeXA4FfKm33JvvnjPPA%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/puppet-dev/CANhgQXvG8Xkv9d4tDBMWeJvLk%3DffdmaCeXA4FfKm33JvvnjPPA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Erik Dalén > -- 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/6b05d2e5-f276-4fdd-b30e-ad700232eaf6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.