While I generally favor correct over fast (worrying about fast before you're correct is a good sign that you're engaged in premature optimization), I'm still trying to figure out the tradeoffs here. Especially since most LISPs & other dynamic languages don't seem to run into this issue - or at least the debate that we're seeing here.
IIUC, the problem is that we've got three "kinds" (not types; which normally refers to bit lengths) of integer: primitive, which is what the JVM does it's math with. boxed, which is the primitive wrapped in a Java object, and what Java normally uses. bigint, which is a clojure-specific kind of integer. Other numeric types don't have issues because they don't have all three kinds (is that right? Or could this entire thread be rewritten in terms of primitive vs. boxed floats?). And the bottom line is that for some reason we can't get from primitives (which are required for speed) to bigints (which are required to maximize the domain for which we get correct answers) automatically. Assuming that that's right, the first question that occurs to me is: Does clojure really need java's boxed types? Other than for java interop, of course. Again, other languages seem to get by with the platform primitives (module tweaks to get type information) going to bigints, and to get reasonable performance by throwing away the dynamic nature of the language for the hot spots. Could clojure do something similar, or is this something technical issue with the JVM, similar to the reason we don't get TCE? <mike -- Mike Meyer <m...@mired.org> http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -- 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