On 9 jan, 04:03, Stuart Sierra <the.stuart.sie...@gmail.com> wrote:
> On Jan 8, 7:28 pm, lpetit <laurent.pe...@gmail.com> wrote:
>
> > It seems that (compile) generates .class files as expected, and also
> > loads the lib in the environment as well.
>
> > Is it a (apparently undocument) feature ? Or a bug ?
>
> It's a feature.  I think it's documented somewhere. :)

OK. I probably skipped it.

OK. For the eclipse plugin eclipse-dev, I'm thinking about how to do
implement the "build" functionality, and I was thinking of having a
clojure environment always running for the purpose of the plugin
(using this environment via swank-like remote calls, for asking it to
help search doc, compile, ...).

But if some people write scripts in libs, there's the risk that
compiling the script as a lib starts the script, thus having
unexpected undesirable effects (loading a Swing GUI, taking too much
time, ...). I think that scripts shouldn't maybe be compiled at all,
but doing things in an automated way, it will not be easy to "guess"
that a file is a script and that the IDE should not try to compile it,
will it ?

> > Later on, if I call (load) (from a fresh clojure environment) from the
> > compiled classes, the top level (println)s are not executed, since not
> > compiled.
>
> Yes, that's the expected behavior.   "compile" only saves the things
> defined in the namespace.

Well, I easily understand that it is the compiled behaviour. And in
the same time, I don't feel it "right" that loading the same lib from
source file or from compiled files can have different results.

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