Re: Java interop: casting

2011-06-17 Thread Gregg Reynolds
On Thu, Jun 16, 2011 at 6:12 PM, Stuart Halloway stuart.hallo...@gmail.com wrote: Hi Gregg, It appears that LocalServiceTestHelper's constructor takes an array of LocalServiceTestConfig. Try (def bar (LocalServiceTestHelper. (into-array LocalServiceTestConfig [foo]))) Stu Hi Stu, Would

Re: Java interop: casting

2011-06-17 Thread Mark Rathwell
In Java, varargs are actually converted to arrays at compile time. It is really just some syntactic sugar allowing you to use nicer syntax for array arguments, and you can pass the arguments as an array, or as a comma delimited sequence of arguments. On Fri, Jun 17, 2011 at 10:57 AM, Gregg

Re: Java interop: casting

2011-06-17 Thread Gregg Reynolds
On Fri, Jun 17, 2011 at 10:17 AM, Mark Rathwell mark.rathw...@gmail.com wrote: In Java, varargs are actually converted to arrays at compile time.  It is really just some syntactic sugar allowing you to use nicer syntax for array arguments, and you can pass the arguments as an array, or as a

Re: Java interop: casting

2011-06-17 Thread Mark Rathwell
Yeah, not sure which is better, Java's or C#'s varargs, but it does make things nicer at times. In C#, the method signature signature screams I AM passing an array, but you can pass arguments either way as in Java. C#: public void UseVarargs(params int[] args) { // Do

Java interop: casting

2011-06-16 Thread Gregg Reynolds
Hi, I'm trying to make the GAE local testing stuff (http://code.google.com/ appengine/docs/java/tools/localunittesting.html) work with Clojure and running into a cast problem. Specifically, the example shows private final LocalServiceTestHelper helper = new LocalServiceTestHelper(new

Re: Java interop: casting

2011-06-16 Thread Stuart Halloway
Hi Gregg, It appears that LocalServiceTestHelper's constructor takes an array of LocalServiceTestConfig. Try (def bar (LocalServiceTestHelper. (into-array LocalServiceTestConfig [foo]))) Stu Stuart Halloway Clojure/core http://clojure.com Hi, I'm trying to make the GAE local testing