Notes |
|
|
I disagree. An order is guaranteed, it's just not specified what it is since the actual order is OS (and probably in our case target language) dependent. However, there is an order there and foldl2 goes from first to last in that order. (It doesn't, example, go from last to first.)
Indeed the definition of the C function readdir (which we use to implement foldl2 on POSIX systems) says:
The type DIR, which is defined in the <dirent.h> header, represents a directory stream, which is an
ordered sequence of all the directory entries in a particular directory.
^^^^^^ |
|
|
(0000676)
|
pbone
|
2014-05-01 17:59
|
|
I'm not convinced. Given that the order is undefined, I really don't see the point in saying we start at it's beginning.
I choose to report this because I quickly looked at the docs, and then in my code i wrote "dir.fold2", because that's what makes sense. The compiler prompted me to change it. This suggests to me that "fold2" is the natural way to think about this. |
|
|
|
Undefined is not the same as system dependent, which is what this is. If you think the fold versions would be useful synonyms then feel free to add them, but I think deprecating the foldl versions is just change for the sake of change. (I suggest you also change the documentation to say that the order is OS dependent or words to that effect.) |
|