> 2. What is the reason for Phobos defining param funcs as template params?
Correct me if I'm wrong but there's no way to pass an arbitrary function to a function in a type-safe way. If you use pointers and casts you can't check if the passed function meets certain requirements (parameters, return type, attributes, etc.) > 3. What is the meaning of 'alias f'? How does it work? This is a totally > enigmatic feature for me. Seems it allows placing anything of any type as > template param. http://digitalmars.com/d/2.0/template.html#TemplateAliasParameter It allows you to pass any D symbol. As the name already suggests, think of it as being a template-local alias to a symbol passed in the instantiation (but note that you can also pass literals as arguments to alias parameters).