[cmucl-imp] Would ext:exit be a good addition?

Raymond Toy toy.raymond at gmail.com
Fri Jan 29 19:56:25 CET 2010


On 1/26/10 8:39 PM, Alex Goncharov wrote:
> Does anybody see a downside to introducing a simple way to exit REPL
> with a status, via something like `(exit 1)'?
>
> CMUCL has 
>
>  (defun quit (&optional recklessly-p)
>    "Terminates the current Lisp.  Things are cleaned up unless Recklessly-P is
>    non-Nil."
>
> but that always exits with status 0, which is often not what is
> wanted.
>   
How about overloading recklessly-p to include the exit code?  If
recklessly-p is a negative integer, do a reckless exit with and exit
code of the absolute value of the code.  If it's a positive integer,
carefully exit with the given code.

This isn't quite backward compatible.  Does anyone ever actually use a
non-nil recklessly-p?  The only difference between them is that
*cleanup-functions* isn't run.

Ray




More information about the cmucl-imp mailing list