Neels J Hofmeyr wrote: > Re is_dir_empty() comment: When I last created function comments starting > with "Helper for..." I was told that that's not really the desired way to > go. We should rather have descriptive names / concise docs, and we should > design functions to be re-used for a particular purpose, rather than > "hiding" code in specialised helper functions. I came to agree with that :)
It was probably me that said that. One of my pet theories is that it's good to write a helper function, but any function is helpful to the design and understanding of a structured system if and only if it has a purpose and an interface that are understandable by itself, in terms of some concepts about the domain it's working in. Thinking of a function as "just a helper" can sometimes lead us to take a random portion of code from the caller and forget about providing a clearly defined subset of the caller's functionality which might later be useful to another caller. - Julian