Re: Clojure sort: is it specified to be stable for all targets?

2011-09-12 Thread Stuart Sierra
In general, if it's not specified in the doc string, then it's not a promise. That said, the implementation of `sort` in Clojure on the JVM uses java.util.Arrays#sort, which is specified to be stable. I would generally expect a language built-in `sort` routine to be stable, so take that for wha

Clojure sort: is it specified to be stable for all targets?

2011-09-11 Thread Daniel Pittman
G'day. The API documentation for clojure doesn't specify if the sort method is stable, unstable, or "implementation defined". Java defines sort to be stable, but Clojure also has two other targets, and I can't tell if I am safe making the assumption that the stable behaviour will carry over to th