I know that having such things in the doc strings would probably be your ideal, but note that clojuredocs.org is editable by anyone, and one could in a few minutes create an account there and document what they consider corner cases.
I don't know where you'd most like to find these kinds of notes. I've just added some examples on clojuredocs.org for "if" that explain these things, and added links from "cond", "if-let", "if-not", "when", and a couple others to see the example for "if" explaining Clojure's logical true and false. Check it out and see if it is what you would hope to find. http://clojuredocs.org/clojure_core/clojure.core/if The cheatsheet at http://clojure.org/cheatsheet (and the tooltip variants available at http://jafingerhut.github.com) link to the clojuredocs pages, so they have visibility to people who use the cheatsheet, or clojuredocs.orgdirectly. Andy On Thu, Apr 12, 2012 at 2:27 PM, Vinzent <ru.vinz...@gmail.com> wrote: > false and true are JVM built-ins. >> > Yes, but clojure uses this booleans as a basic type, in the same way as it > does for lists and symbols. > > >> You could argue the same way that since (1 2 3) and [1 2 3] are equal, >> >> they represent the same value, and thus you should be able to call >> `subvec' on both of them. >> > Well, if we draw an analogy with subvec, then the behaviour we're > discussing would rather be the same as if (subvec [1 2 3] 1) would return > [2 3] and (subvec '(1 2 3) 1) would return "haha, gotcha!" :) > > Since you are complaining about =, do you mean that = should be >> >> special-cased to do an identity-check instead of an equality check for >> java.lang.Booleans? E.g., are you demanding that (= false >> (Boolean. false)) should be false? That would be horrible. >> > > It's not that I'm complaining about =, it's more about documentation and > such kind of stuff. On the other hand, if we ignore the fact that = uses > .equals under the hood, it'd be reasonable to return false in this case > (because clojure doesn't really treat the two as equal things). > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en