Hi Meikel, Even if I use what type does underneath and call .getClass myself (so there is no boxing), I still get type long. Also to be more specific, I am interested in the primitive int, not java.lang.Integer.
Best, Brent On Sep 18, 4:10 am, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > Am 18.09.2011 um 07:31 schrieb Brent Millare: > > > Is it possible to cast a number into an int in 1.3.0-RC0? > > > ;user=> (type 0) > > java.lang.Long > > ;user=> (type (int 0)) > > java.lang.Long > > int does cast to an integer for direct java interop. type is function so the > integer will be boxed. 1.3 will use only Long (and Double) for boxing. Non of > the shorter types is used. If you need an Integer you must create it > directly: (type (Integer. 0)) will be java.lang.Integer. > > Sincerely > Meikel -- 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