On 26.02.2009, at 08:47, Jeff Valk wrote: > String representation obviously uses :type now in a very particular > way. I'm not sure where this happens though. Can anyone shed some > light on the details?
print-method now dispatches on type, rather than class as it did before. There is no default implementation for print-method, so if you put something as :type that has no implementation of print- method, weird things will happen. The fix is to provide a default implementation for print-method. Try executing this: (defmethod print-method :default [o w] (print-method "failed" w)) before printing your object, and it should print "failed" without any exception. There should be a default in clojure.core, but I am not sure what it should best be. Should it print the object stripped of its metadata? Or a string indicating the problem? Or should it throw an exception? Konrad. --~--~---------~--~----~------------~-------~--~----~ 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 clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---