Welcome! Please see the About page for a little more info on how this works.

0 votes
in Docs by

file-seq uses java.io.File.listFiles that has a note about order not being portable across filesystems: https://docs.oracle.com/javase/9/docs/api/java/io/File.html#listFiles--

3 Answers

0 votes
by

Comment made by: alexmiller

Given that the docstring does not explicitly or implicitly imply an order, and there is no such natural ordering, this seems obvious to me without stating it?

0 votes
by

Comment made by: yegortimoshenko

I had a bug in a program where I presumed that file-seq would always return a sorted sequence, and I've catched it only after HFS+ -> APFS switch (file-seq always returns alphabetically sorted sequence in HFS+). I thought JVM would abstract away differences in file systems, and I was wrong. (I understand they don't do that for performance).

Given that, unlike sets or maps, sequences are ordered, I think it would be valuable to have this quality explicitly noted in the docstring, because it might not be evident just from the output.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2310 (reported by yegortimoshenko)
...