Sure I understand this. But I have need to generate hundreds of methods in 
single class. In clojure it is just few lines. Basically I use clojure in 
this case as an interface to asm lib. 
Also I was thinking about using the varargs not only in gen-class but in 
feify as well, which generates implementations of interfaces at runtime. 
Shim wouldn't help here.

--
Lambder

On Friday, 16 August 2013 14:25:56 UTC+1, sw1nn wrote:
>
>
> On 16 August 2013 12:59, Daniel Kwiecinski <daniel.k...@gmail.com<javascript:>
> > wrote:
>
>> This is a great patch. Have you submitted it in clojure jira?
>>
>
> I haven't submitted it. 
>
> I've come to the conclusion that generating complex classes using 
> (:gen-class) is a waste of time. Presumably the primary use case for 
> generating complex java classes is for it to serve as some sort of API 
> endpoint to your system that hides the clojure behind the curtain.
>
> But for the java class to be useful as an api to your system, you want 
> javadocs and an actual file that developers can open in the IDE of their 
> choice.
>
> For background, Rich Hickey gave an impromptu talk about this at the 
> Clojure eXchange in london last year[1]. Essentially his advice was to 
> write a java shim that calls the clojure instead of getting into 
> contortions to do this with :gen-class. This is how it's done in datomic.
>
> It's pretty straightforward to write such a shim. Having said that there 
> are now libraries that make calling clojure from java easier. e.g. Look at 
> @mikera's clojure-utils lib[2]. 
>
> [1]
> http://skillsmatter.com/podcast/scala/impromptu-rich-hickey-lightning-talk
> [2]
> https://github.com/mikera/clojure-utils/blob/master/src/main/java/mikera/cljutils/Clojure.java
>  
>  
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to