Re: case/java interop weirdness

2013-12-31 Thread Cedric Greevey
Not really, as the lookups will happen at macroexpansion time and not at runtime. It should be as efficient as a normal (case ...). On Tue, Dec 31, 2013 at 7:00 AM, Paul Butcher wrote: > On 30 Dec 2013, at 16:34, Cedric Greevey wrote: > > To do it with case, you'd need to wrap case in a macro

Re: case/java interop weirdness

2013-12-31 Thread Paul Butcher
On 30 Dec 2013, at 16:34, Cedric Greevey wrote: > To do it with case, you'd need to wrap case in a macro that expanded to > `(case ~thingy ~(eval case1) ...) or something along those lines Thanks, but I suspect that that might be another way of saying "use condp" :-) Cheers, -- paul.butcher-

Re: case/java interop weirdness

2013-12-30 Thread Cedric Greevey
To do it with case, you'd need to wrap case in a macro that expanded to `(case ~thingy ~(eval case1) ...) or something along those lines, with the evals snapping lookups like FetcherEvent/EVENT_TYPE_FEED_POLLED to the associated constants. This will have the effect of classloading the class with th

Re: case/java interop weirdness

2013-12-30 Thread Paul Butcher
On 30 Dec 2013, at 13:57, Nicola Mometto wrote: > The test clauses of case expressions are not evaluated, so that case is > trying to "match" the symbol 'FetcherEvent/EVENT_TYPE_FEED_POLLED, not > the value of FetcherEvent/EVENT_TYPE_FEED_POLLED. Ah - I was aware of the requirement for the const

Re: case/java interop weirdness

2013-12-30 Thread Nicola Mometto
The test clauses of case expressions are not evaluated, so that case is trying to "match" the symbol 'FetcherEvent/EVENT_TYPE_FEED_POLLED, not the value of FetcherEvent/EVENT_TYPE_FEED_POLLED. Paul Butcher writes: > I'm sure I'm missing something very simple here, but I'm damned if I can see >

case/java interop weirdness

2013-12-30 Thread Paul Butcher
I'm sure I'm missing something very simple here, but I'm damned if I can see it. I'm trying to use the Java Rome RSS/Atom utility library from Clojure. The Rome Fetcher library defines a FeedEvent class, which among other things defines a number of static final string members: https://github.co