[Issue 12391] DirEntries throws in foreach

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 28 18:57:53 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=12391

--- Comment #10 from Jason Spashett <jason at spashett.com> ---
I see that some documentation has been added to this, which is helpful. I do
think however that SpanMode.depth is somewhat unhelpful to have, given that
there is no possibility of handling errors and continuing; some people may miss
the fact that it behaves in the way it does. 

It may be better to remove the depth mode altogether if the API isn't going to
be adjusted in any way, but equally I don't see why this API does not follow
that of countless other languages that have solved the same problem as I
previously mentioned. Here is rust's effort if the python one was unsound in
some way.
https://rust-lang-nursery.github.io/rust-cookbook/file/dir.html#recursively-find-duplicate-file-names

--


More information about the Digitalmars-d-bugs mailing list