On Feb 3, 2:49 pm, Travis <twell...@gmail.com> wrote: > I'm writing an app that will be dealing with large numbers of numbers. > Perhaps I should gloss over the memory problem until it actually > becomes a problem, but I'm coming across really weird behavior. > > user=> (type (first r9)) > java.lang.Double > user=> (type (first (into-array Double/TYPE r9))) > java.lang.Double > user=> Double/TYPE > double > user=> (= *2 *3) > true > user=> (= *2 *3) > false > user=> (type (into-array Double/TYPE r9)) > [D > user=> (type (double-array r9)) > [D > > Is the problem at the repl? IE, are primitive doubles being boxed to > java.lang.Double when I access the array via first, so I always see a > class type while they really are primitives? > > Thanks, > Travis
user=> (type (double 1.1)) java.lang.Double IIRC, all function boundaries, unless otherwise specified to handles primitives, will autobox. See more here: http://clojure.org/java_interop#toc36 -- 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