SpanMode uses incorrect terminology (breadth)

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Sep 18 08:19:51 PDT 2012


On 9/18/12 10:25 AM, David Piepgrass wrote:
>> Breadth-first (probably never required):
>> a/b
>> a/c
>> a/1.txt
>> a/2.txt
>> a/b/1.txt
>> a/b/2.txt
>> a/c/z
>> a/c/1.txt
>> a/c/z/1.txt
>> Defining property: number of /'s increases monotonically. Note how the
>> deeper you go, the more spread out the children become. It's ALL
>> children, then ALL grandchildren, then ALL great-grandchildren, etc.
>>
>> I wouldn't bother implementing breadth-first. It's doubtful that
>> anyone would want it, surely...?
>
> Actually I prefer breadth-first search when searching the file system.
> When I search an entire volume, inevitably the (depth-first) search gets
> stuck in a few giant, deep directories like the source code of Mono or
> some other cave of source code, you know, something 12 directories deep
> with 100,000 files in it. A breadth-first search would be more likely to
> find the thing I'm looking for BEFORE going spelunking in these 12-deep
> caves.

Yes, that was my intent too.

Andrei


More information about the Digitalmars-d mailing list