On Nov 28, 2008, at 7:22 PM, ppierre wrote:

> More complete :
>
> (def *locale* nil)
>
> (binding [clojure.core/format
>            (fn [fmt & args]
>              (String/format (or *locale*
>                                 (java.util.Locale/getDefault))
[...]
> (with-out *err*
>  (with-locale "fr"
>    (printf "%-10.4f\n" Math/PI)
>    (flush)))

I think these would be useful additions to Clojure proper:

        - *locale* (should be set!-able as well),
        - updating printf and format to support *locale*,
        - with-locale,

These macros would likely be useful:

        - with-out
        - with-in
        - with-err

but the amount of code they replace seems insufficient for them to be  
part of the language. I think they would make a fine addition to a  
convenience library.

--Steve


--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to