https://issues.dlang.org/show_bug.cgi?id=14340
Andrei Alexandrescu changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=14340
--- Comment #8 from Xinok ---
I can confirm this doesn't work in Python either:
https://ideone.com/oEkJPi
This might be justification to add a "sorted" function to Phobos so we can
exhibit similar behavior in D, but I don't think the solution is to
https://issues.dlang.org/show_bug.cgi?id=14340
--- Comment #7 from Ivan Kazmenko ---
Hmm. If you are sure Timsort suffers from the same problem, it should be
visible in other languages as well. We have to test that in Java (sorting
objects) and Python, too.
--
https://issues.dlang.org/show_bug.cgi?id=14340
--- Comment #5 from Ivan Kazmenko ---
(In reply to Xinok from comment #3)
> ... The predicate is expected to define a total order [1]
> which your predicate does not.
But it does! The order is "x < y if:
(1) number of xs in the array is greater tha
https://issues.dlang.org/show_bug.cgi?id=14340
--- Comment #6 from Xinok ---
Gah, sorry, I misunderstood the problem. >_< For some reason, I thought your
predicate was dependent on the order of the elements. Ignore my last post...
I still feel that this is bad practice and should be discouraged
https://issues.dlang.org/show_bug.cgi?id=14340
--- Comment #4 from Ivan Kazmenko ---
Have you followed the previous discussion?
Note that "count" is not just any predicate, but:
(1) a useful one,
(2) one that just requires the array to contain its elements, in any order,
whenever the predicate i
https://issues.dlang.org/show_bug.cgi?id=14340
Xinok changed:
What|Removed |Added
CC||xi...@live.com
--- Comment #3 from Xinok ---
This i
https://issues.dlang.org/show_bug.cgi?id=14340
Ivan Kazmenko changed:
What|Removed |Added
Keywords||pull
--- Comment #2 from Ivan Kazmenko ---
https://issues.dlang.org/show_bug.cgi?id=14340
Ivan Kazmenko changed:
What|Removed |Added
Severity|major |critical
--- Comment #1 from Ivan Kazmenko