[r6rs-discuss] [Formal] "#! /usr/bin/env" is not "portable." It's Unix-specific.

MichaelL at frogware.com MichaelL at frogware.com
Wed Nov 15 09:47:43 EST 2006


> > In practise, implementations will probably only ignore the
> > first line, if it starts with a #!
> 
> I would be happy if this was so, but in <7.1.1> R5.91RS states that
> 
> "Implementations are required to ignore the first line, however,
>  even if it is not the above."
> 
> ("The above" being "#! /usr/bin/env scheme-script".)

Right. Always ignoring the first line doesn't make sense to me.

> I am not against #! in general, I just do not understand why
> we have to treat the first line in a special way. Why is it not
> sufficient to make #! a comment to the end of line?
> 
> This would still allow you to run
> 
> % echo "(+ 1 2 3)" | my-interpreter
> 
> while enabling Scheme programs to run as scripts at the same time.

Good point.



More information about the r6rs-discuss mailing list