Several comments
shivers@xxxxxx
(10 Mar 2001 02:57 UTC)
|
Re: Several comments
Per Bothner
(10 Mar 2001 03:48 UTC)
|
Re: Several comments
sperber@xxxxxx
(10 Mar 2001 08:50 UTC)
|
Re: Several comments
shivers@xxxxxx
(10 Mar 2001 17:23 UTC)
|
Re: Several comments
Martin Gasbichler
(11 Mar 2001 14:31 UTC)
|
Re: Several comments
Marc Feeley
(20 Mar 2001 16:14 UTC)
|
Re: Several comments
sperber@xxxxxx
(20 Mar 2001 16:33 UTC)
|
Re: Several comments
Marc Feeley
(20 Mar 2001 17:11 UTC)
|
Re: Several comments
sperber@xxxxxx
(22 Mar 2001 08:27 UTC)
|
Re: Several comments
Marc Feeley
(22 Mar 2001 13:05 UTC)
|
Re: Several comments
sperber@xxxxxx
(22 Mar 2001 13:29 UTC)
|
Re: Several comments
Marc Feeley
(22 Mar 2001 15:06 UTC)
|
Re: Several comments
sperber@xxxxxx
(22 Mar 2001 15:11 UTC)
|
Re: Several comments
Marc Feeley
(22 Mar 2001 15:28 UTC)
|
Re: Several comments Per Bothner (22 Mar 2001 17:01 UTC)
|
Re: Several comments
Marc Feeley
(22 Mar 2001 18:22 UTC)
|
Marc Feeley <xxxxxx@IRO.UMontreal.CA> writes: > #! /bin/sh > "exec" "scheme-script" "$0" "$@" > (define (main arg1 arg2) > (write (+ (string->number arg1) (string->number arg2)))) > (apply main (command-line-arguments)) I prefer this approach. I think it is more compatible with the traditional "load". The Kawa compiler can take this kind of script, and if you compile it with --main you get a stand-alone Java application. If you load it, you get the behavior expected of the script. I don't think the rationale for easier debugging is strong enough to compensate for a clumsier and less traditional interface. I think "script-arguments" is not a good name. What is a "script"? Why the word "script" as apposed to "program" or "application"? "command-line-arguments" is both more descriptive and avoids the "script" vs "program" issue. It is so descriptive that both Scsh and Kawa use it - but they use it for a global variable. Using it for a function would clash. Scsh does have "(command-line)" which returns the complete command line, including the name the script was executed as. -- --Per Bothner xxxxxx@bothner.com http://www.bothner.com/~per/