Re: Proxy vs. glue class

2014-04-07 Thread Phillip Lord
Mikera writes: > +LOTS for this. I have wanted to extend a Java abstract base class *many* > times in Clojure. It's a real pain point, right now. Especially for interop > with Java libraries that expect you to extend base classes in order to > write plugins etc. Currently when this comes up I j

Re: Proxy vs. glue class

2014-04-05 Thread Colin Fleming
Yeah, it's annoying, no doubt. I have a bunch of classes that do nothing but override a protected method with a public one so I can proxy without warnings, some that I have to use because I can't create a non-trivial constructor, and so forth. Re: your proposal, I think I'd prefer to leave reify e

Re: Proxy vs. glue class

2014-04-05 Thread Mikera
On Saturday, 5 April 2014 08:08:13 UTC+8, Colin Fleming wrote: > > FWIW, in Cursive, which is a big ball of mixed Clojure + Java, I've given > up trying to use gen-class and have started using Java shims for > everything. I like it a lot more than gen-class, which I always feel like > I'm fighti

Re: Proxy vs. glue class

2014-04-04 Thread Colin Fleming
FWIW, in Cursive, which is a big ball of mixed Clojure + Java, I've given up trying to use gen-class and have started using Java shims for everything. I like it a lot more than gen-class, which I always feel like I'm fighting. With the new Java->Clojure API in 1.6 (or the equivalent using RT.var()

Re: Proxy vs. glue class

2014-04-04 Thread Anvar Karimson
Ok, thanks! I will have a look! On Friday, 4 April 2014 16:43:20 UTC+1, Phillip Lord wrote: > > > Yeah, gen-class is the thing. Proxy, well, proxies, but genclass > produces a statically compiled ahead of time class. It's a real Java > class, so yes, you can use it from Clojure like any other Ja

Re: Proxy vs. glue class

2014-04-04 Thread Phillip Lord
Yeah, gen-class is the thing. Proxy, well, proxies, but genclass produces a statically compiled ahead of time class. It's a real Java class, so yes, you can use it from Clojure like any other Java class. Genclass is a little more painful than proxy, but probably a little less painful than having

Re: Proxy vs. glue class

2014-04-04 Thread Anvar Karimson
Is that via gen-class? I have to admit that I am not very familiar with gen-class, is it still possible to use the class from Clojure? Yes, that is probably the most pragmatic choice, premature optimization and all that. On Friday, 4 April 2014 15:03:00 UTC+1, Phillip Lord wrote: > > Anvar Kari

Re: Proxy vs. glue class

2014-04-04 Thread Phillip Lord
Anvar Karimson writes: > I am trying to understand what the best course of action would be in the > following scenario: > > I have a Java base class that I need to extend. The class is fundamental to > my application and will be running fairly hot compared to other bits of > code in the applica

Proxy vs. glue class

2014-04-04 Thread Anvar Karimson
Hi, I am trying to understand what the best course of action would be in the following scenario: I have a Java base class that I need to extend. The class is fundamental to my application and will be running fairly hot compared to other bits of code in the application. Therefore I want it to e