On 9/5/11 1:05 AM, Simen Kjaeraas wrote:
StaticFilter definitely should be in Phobos. StaticReduce too, but you don't seem to have it on your list. I also often use StaticIota.
I have a StaticReduce lying around as well, but didn't include it in the snippet as I have used it exactly once so far, and wanted to keep the list short. It should probably be in Phobos though, even if only to compliment staticMap (the name of which really should be capitalized, I think); I'll add it to the Gist.
For more handy templates I feel should be in Phobos, see Philippe Sigaud's dranges: http://www.dsource.org/projects/dranges
Wow, thanks for the tip, I vaguely remembered it being talked about here, but didn't know it includes so many metaprogramming goodies. From quickly skimming the code in templates.d, it seems like some of the templates unnecessarily rely on string mixins though, which considerably reduces their value. For example, Philippe's take on »Compose« will only work if the templates in question are from drange.template as well (resp. from modules imported by it), similar to the restrictions for std.functional string lambdas.
David
