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)

Re: Several comments sperber@xxxxxx 22 Mar 2001 15:11 UTC

>>>>> "Marc" == Marc Feeley <xxxxxx@IRO.UMontreal.CA> writes:

Marc> and "scheme-script" would always invoke "script-main" after loading a
Marc> script.
>>
>> I can imagine going with that.  Opinions, anyone else?

Marc> Can you explain your position on the other alternatives.  In
Marc> particular the second one which is my preference:

Marc>   #! /bin/sh
Marc>   "exec" "scheme-script" "$0" "$@"
Marc>   (define (main arg1 arg2)
Marc>     (write (+ (string->number arg1) (string->number arg2))))
Marc>   (apply main (script-arguments))

It has the problem mentioned in the rationale: I type C-c C-l in
XEmacs (or "Execute" in DrScheme), and the thing runs when it
shoudn't.

Marc> My third alternative, based on the implicit call of a
Marc> "script-main" procedure, requires the compiler to know it is
Marc> compiling a script so it has to be given a special compilation
Marc> option, or detect that the file being compiled starts with "#!"
Marc> (actually it is a bit more complicated because it is the linker
Marc> that has to know it is generating an executable and one of the
Marc> source files was a script).

Yes.

--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla