Hello, Christian

Could you explain the reasoning behind compiling the Clojure code
> before the Java code?


It's very good question, and to be honest I don't know exact question for
it. I may imagine both cases from Clojure to Java and vise versa. Making
first variant default I was followed by one letter I had received. It was
about some project written in IDEA, where Clojure is used for core
funcationality whereas al UI is written in Java via UI designer.
Untill we have no stub-generation (as it was done in Groovy) or Java code
analysis like in Scala only one consistent solution will be to define
compilation order explicitly. Tricky project decomposion into modules may
help to resolve cross-languge dependencies.

With best regards,
Ilya

2009/3/25 Christian Vest Hansen <karmazi...@gmail.com>

>
> Sounds great :)
>
> On Wed, Mar 25, 2009 at 4:42 PM, Ilya Sergey <ilyas...@gmail.com> wrote:
> > Hello, all.
> >
> > I've just uploaded new version of La Clojure plugin for IntelliJ IDEA.
> Among
> > several bugfixes and minor changes I have to note several essential
> moments.
> >
> > 1. Now Clojure support is added as so-called `facet', which may be
> attached
> > to every module. Creating new module, just choose Clojure among desired
> > technologies. In this case necessary clojure jar will be downloaded
> > automatically and adjusted as a project library unless you point to it
> > manually.
> >
> > 2. If you open existing project, clojure facet will be detected
> > automatically. For now facet serves as a label for clojure-aware modules.
> In
> > that modules you may invoke "create new clojure file" action and their
> > clojure files will be compiled.
> >
> > 3. From now IntelliJ IDEA provides support for batch compilation of
> Clojure
> > files, whose namespace is marked by :gen-calss tag. Compiled classes will
> be
> > places to the appropriate output directory of a module. One may choose,
> > which sources should be compiled first - Java or Clojure to resolve
> one-way
> > dependencies. By default Clojure is compiled first.
>
> Could you explain the reasoning behind compiling the Clojure code
> before the Java code?
>
> While trying out Daniel Spiewaks Clojure enabled Buildr, which also
> compiles the Clojure code first, I noticed that I could not access
> static methods of the classes that were defined in Java code. I have
> not tested this, but I would assume that type hinting using these
> classes don't work either. On the other hand, Java works with Clojure
> through the classes and interfaces defined in clojure.jar, and
> resolves their Vars at run time. The 'gen-class case stands as an
> example where you might have to compile Clojure first, but I wonder if
> this is the typical case?
>
> > Moreoverm you may to
> > choose whether to copy *.clj files to output path or not (this might be
> > useful if you're going to invoke some functions from *.clj files
> > dynamically). And, of course, automatic detection and compilation of
> > class-labeled clojure files may be switched off. For more details see
> File
> > -> Settings -> Compiler -> Clojure.
> >
> > For someone these settings might seem not sufficiently flexible. So, all
> > comments and proposals are appreciated. :)
> >
> > With best regards,
> > Ilya Sergey
> >
> >
> >
> > >
> >
>
>
>
> --
> Venlig hilsen / Kind regards,
> Christian Vest Hansen.
>
> >
>

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