[Swift-devel] Re: Criteria for rollout

Mihael Hategan hategan at mcs.anl.gov
Thu Jan 10 18:14:26 CST 2008


On Fri, 2008-01-11 at 00:04 +0000, Ben Clifford wrote:
> On Thu, 10 Jan 2008, Mihael Hategan wrote:
> 
> > Another good point. @filenames. But then looking at the code for passing
> > an array, it doesn't seem like it keeps any particular order either:
> 
> I didn't even know passing an array outside of @filenames worked...

:)

> > 
> > However, @filenames hurts. The other one not as much.
> 
> yeah.
> 
> I think the correct behaviour should be to output in the order of the 
> array indices (for both plain array passing and for @filenames).

So I think sorting in all cases (i.e. getFringePaths()) isn't necessary.
Not sorting is faster.

So a simple solution would be to sort those paths right in
leavesFileNames(). In the particular case of an array, it will achieve
the desired result. In other cases (i.e. more complex data types) it
would result in some form of order, not particularily worse than no
order. Make sense?

> 
> I don't think anything else maps over an array apart from @filenames.
> 




More information about the Swift-devel mailing list