clojure/exit for boot.clj

21 views
Skip to first unread message

Drew Raines

unread,
Apr 10, 2008, 3:14:37 PM4/10/08
to clo...@googlegroups.com
Hi.

I've been typing (. System (exit 0)) to kill the JVM after building a
new clojure.jar. Can we include this functionality in the language?
Patch attached.

-Drew

clojure-exit.patch

Drew Raines

unread,
Apr 10, 2008, 3:31:32 PM4/10/08
to clo...@googlegroups.com
Drew Raines wrote:

> Patch attached.

Here's a more idiomatic version.

-Drew

clojure-exit.patch

J. McConnell

unread,
Apr 10, 2008, 3:35:26 PM4/10/08
to clo...@googlegroups.com

I have the same thing in a file that loads every time I start up the
REPL. While I wouldn't mind seeing this added to boot.clj, my first
instinct was to propose a new file that loads only for the REPL, not
for Script, that could define things that are useful in the REPL
environment. What held me back was that this is the only thing I have
so far.

Does anyone else have any functions that they have found to be
particular beneficial in the REPL but wouldn't be otherwise?

- J.

Stuart Sierra

unread,
Apr 10, 2008, 4:52:47 PM4/10/08
to Clojure
With the new Java calling syntax, you only need to type
(System.exit 0)

Also, Control-D kills the REPL (on Linux, at least).

-Stuart

On Apr 10, 3:35 pm, "J. McConnell" <jdo...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages