Re: Method overloading anomaly. (specifically ArrayList/remove)

2009-01-10 Thread CuppoJava
After a bit more experimenting, I found the following workaround to be suitable for the time-being in case anyone else is having similar troubles. (defn arraylist_remove [#^ArrayList list index] (.remove list (int index))) --~--~-~--~~~---~--~~ You received this

Re: Method overloading anomaly. (specifically ArrayList/remove)

2009-01-10 Thread Christophe Grand
CuppoJava a écrit : > That workaround works nicely for now. I think though that this problem > can potentially be the source of many hard-to-find bugs though. ie.. > like in my second example, the vector of ArrayLists. > You can ask to be warned: user=> (set! *warn-on-reflection* true) true use

Re: Method overloading anomaly. (specifically ArrayList/remove)

2009-01-09 Thread CuppoJava
Thanks Chouser, That workaround works nicely for now. I think though that this problem can potentially be the source of many hard-to-find bugs though. ie.. like in my second example, the vector of ArrayLists. --~--~-~--~~~---~--~~ You received this message because y

Re: Method overloading anomaly. (specifically ArrayList/remove)

2009-01-09 Thread Chouser
On Fri, Jan 9, 2009 at 9:49 PM, CuppoJava wrote: > > After more experimenting, it seems like a potentially difficult bug to > resolve. Clojure attempts to treat all numbers as objects, but in this > case, the choice of whether a number is an object or a primitive > affects which method is called.

Re: Method overloading anomaly. (specifically ArrayList/remove)

2009-01-09 Thread CuppoJava
After more experimenting, it seems like a potentially difficult bug to resolve. Clojure attempts to treat all numbers as objects, but in this case, the choice of whether a number is an object or a primitive affects which method is called. (let [temp [(java.util.ArrayList. ["foo"])]] (.remove (f