Tweaking `format` so that it accounts for all sorts of edge cases almost certainly isn't going to happen, and would be a horrible kludge in any case.
To extend Tom's point, if you really want a format that knows about all of Clojure's scalars and data structures, cl-format is what you want, and it comes with the language. If you don't want to learn about cl-format, then a local wrapper around `format` that does whatever you like re: coercions to standard Java numeric types would be ~3 lines. - Chas On Jul 28, 2011, at 7:52 AM, Andrea Tortorella wrote: > Thanks for your replies, > > +1 for enhancing format > > Maybe it could handle also rationals, converting them to doubles, but > it could be to much. > > On Jul 28, 9:47 am, Sean Corfield <seancorfi...@gmail.com> wrote: >> On Wed, Jul 27, 2011 at 11:48 PM, Tom Faulhaber <tomfaulha...@gmail.com> >> wrote: >>> FWIW, clojure.pprint.cl-format handles this fine in 1.3: >> >>> (cl-format nil "~d" 2N) >>> => "2" >> >> Wow, I just spent the last 30 minutes reading Common Lisp the >> Language, 2nd Ed, chapter 22 which describes how powerful and >> mind-bending that is... -- 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