On Sun, Feb 15, 2009 at 10:38 AM, John D. Hume <duelin.mark...@gmail.com> wrote:
>
>> files? It seems tedious to have to add ":gen-class" to the source
>> file, start a REPL, and enter a compile form.
>
> The :gen-class is only needed if you want to generate a Java class of
> a certain stripe. It's not required for AOT compilation in general.

What do you mean by "a certain stripe"? I thought :gen-class was
needed to save the generated bytecode in a .class file.

> It seems most projects do it with an ant target something like this:
>
>  <target name="compile" depends="init">
>    <java classname="clojure.lang.Compile"
> classpathref="project.classpath" failonerror="true">
>      <classpath path="${src.dir}" />
>      <sysproperty key="clojure.compile.path" value="${classes.dir}" />
>      <arg value="com.example.whatever.namespace.to.compile" />
>    </java>
>  </target>

Thanks for sharing that. Of course the same is true for Java. Most
compiles are done by either Ant, Maven or an IDE. That said, would we
be okay with getting rid of the javac command? That's why I think
Clojure should ship with a cljc script like the one Meikel created. It
provides an easy way for beginners to create .class files without
having to go through the work of setting up an Ant build file. Maybe
it would just be used for experimenting with things like calling
Clojure code from Java, but it still seems useful to me.

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to