On 9/16/12 2:57 PM, Ben Davis wrote:
According to http://dlang.org/phobos/std_file.html :

depth
Spans the directory depth-first, i.e. the content of any subdirectory is
spanned before that subdirectory itself. Useful e.g. when recursively
deleting files.

breadth
Spans the directory breadth-first, i.e. the content of any subdirectory
is spanned right after that subdirectory itself.

That's not what breadth-first means at all. See
http://en.wikipedia.org/wiki/Tree_traversal which has the correct
definition: breadth-first means ALL directories at one level are
returned before ANY child of ANY directory is considered.

Wikipedia uses the terms preorder and postorder for what's intended
here, but those are a bit obtuse. Something like parentFirst and
childrenFirst would get the message across clearly.

I don't much mind what the names change to, but the current completely
wrong situation really irks me! Deprecate it at once! :P

Ben :)

What would be an example illustrating that "breadth" is doing the wrong thing?

Andrei

Reply via email to