Sticking to long and double gets away from Java semantic but it is done to improve numeric performances. You can actually hint in 1,3 on the return type of a function to avoid automatic boxing and have your code work entirely with a "native" type. Boxing if I recall correctly will convert systematically to BigDecimal.
Any computation could then be carried on, even if it does not fit in one of the "native" types (long or double). If you work explicitly with longs or doubles, it's at the expense of (potential) overflow exceptions. If you have a intense numeric computations it is assumed that you know about these potential limits. As for the syntax to pass bytes, ints, ... to Java, I cannot recall the exact syntax to do it but it should be similar to type hints used in 1.2. No idea if the Conj videos are available yet... Luc P. Mike Anderson <mike.r.anderson...@gmail.com> wrote .. > Hi all, > > I was testing some code under Clojure 1.3 alpha 3 that works correctly > in Clojure 1.2 and got the following error: > > "CompilerException java.lang.IllegalArgumentException: Only long and > double primitives are supported" > > For some reason I don't get a full stack trace saying where the error > occurred - the line that the error referred to was simply a " (java.io > File)" in the middle of a namespace import statement. > > Any idea what might be going wrong here? > > Also - I'm a bit worried as the message suggests that Clojure won't > support int and float primitives for some purposes - which are pretty > essential for Java interop - surely that can't be true? Or is this > just a temporary thing during the Alpha development? > > Mike. > > -- > 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 -- 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