Hello, Coming back to the original question:
On Tue, Sep 8, 2009 at 6:50 AM, Timothy Pratley<timothyprat...@gmail.com> wrote: > > Is there a way to deal with this: > user=> (> \a \b) > java.lang.ClassCastException: java.lang.Character cannot be cast to > java.lang.Number (NO_SOURCE_FILE:0) > > So far the only things I know are to coerce or use interop eg: By 'coerce' I assume you mean something like: user=> (< (int \a) (int \b)) true What's wrong with it? (or this is what makes the grievance 'minor' ?) About the compare/compareTo discussion: the pain point here (for me) is that according to java docs, Character.compareTo does not use the locale information when comparing strings. Comparing as ints obviously doesn't help. So the internationally correct :-) way would be to use java.text.Collator for text-related comparisons. Maybe Clojure's compare should use java.text.Collator when comparing strings and chars - or add a textCompare function that would do that, to avoid slowing down compare? Thanks, > user=> (.compareTo \a \b) > -1 > -- Miron Brezuleanu --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---