Thanks for the explanation Stuart,

So it seems that all the Swank Clojure IDEs rely on files only 
containing "safe" code.  I guess that's OK provided everyone understands 
this.

Is is any way to only process the def's?  For example processing the 
following would only define the symbol "foo", but not call it.

    (defn foo [message]
        (pop-up-window message))

    (foo "Hi Mom!")

If so, I could do references safely.

P


Stuart Sierra wrote:
> On Jan 22, 6:51 pm, Peter Wolf <opus...@gmail.com> wrote:
>   
>> However, if there is only one Clojure image used for references and the
>> like, what happens if someone calls an infinite loop, or infinite
>> recursion, in a file.  Does the Clojure server hang/blow up?  
>>     
>
> If you code an infinite loop, the SWANK server will run an infinite
> loop. The only solution is to kill off the Java process. If you wanted
> to get clever, you could load the file in a separate thread and just
> kill off that thread.
>
>   
>> For example, I was using the SmallSnake code for testing, and when that
>> file is loaded, it pops up a window and runs a process forever.  
>>     
>
>  That's an unfortunate side effect of using Clojure as a scripting
> language like Perl or Python. Perhaps it would be more proper for the
> distributed file to define a function that will run the application.
>
> -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