yes, I agree sorting should be explicit as there's no natural order.
However sorting after calling dirEntries is not great as typically one
wants to sort within a given directory level and it's too late to sort once
all the directory levels are flattened.
so how about having an extra argument that takes a lambda (eg
binaryFun!"a<b") in dirEntries, or, having an additional function in
std.file that takes such lambda.


On Wed, Dec 11, 2013 at 2:31 AM, Marco Leise <[email protected]> wrote:

> Am Wed, 11 Dec 2013 08:00:27 +0100
> schrieb "Jesse Phillips" <[email protected]>:
>
> > It should only be documented. In my experience processing files
> > don't need a particular order and sorting may not be needed by
> > name.
> >
> > Returning a sorted directory is difficult to define, should
> > directories come first or be mixed with the files. Is uppercase
> > grouped together? Does A come before a. Should the extension be
> > included or postponed for later.
> >
> > I think sorting should be explicit.
>
> Does 2.jpg come after 10.jpg ? What's the order of
> Arabic-Indic "one" ۱ compared to "Latin one" 1 ? And so on and
> so forth.
>
> --
> Marco
>
>

Reply via email to