On 6 Jul, 2011, at 9:58 , Ken Wesson wrote: > I wonder if generic math should become part of core for 1.4?
Not really the most important question for now - what matters more is how generic math should best be implemented in Clojure. I don't think generic math should become the default (i.e. replace clojure.core/+ etc.) before we have an implementation with no significant speed penalty compared to the current number-only maths routines. > Multimethods of course are too slow for core arithmetic functions but > we have protocols now and when a protocol is implemented inline in a > datatype it runs as efficiently as any Java method call. clojure.contrib.generic uses multimethods for binary dispatch. This cannot be done using protocols. Generic maths with Java-style dispatch is probably less useful, though of course faster. 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 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