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

From: Jens Axel Søgaard <jensaxel>
Date: Wed Nov 15 15:14:31 2006

AndrevanTonder skrev:
> On Wed, 15 Nov 2006, Jens Axel S?gaard wrote:
>
>> If we don't treat the first line specially, then all one-liners
>> become two-file scripts in Unix.
>
> Not necessarily. The draft does not require scripts to be whole files.
> As a result, while the Unix script starts on the first line, we are
> entitled to regard the Scheme script as starting on the next line of the
> same file. The first line of the Unix script is the #!, while the first
> line of the Scheme script is whatever comes next. In this view, R6RS
> has to specify the Scheme script, but can avoid specifying the first
> line of the Unix file, which is then not part of the Scheme script.

I think we agree? I was trying to argue that the draft does indeed
specify the right thing.

Here is the context:

Jens Axel S?gaard wrote:
> Niels Holm wrote
> > Ignoring the first line would open the door to a lot of bad
> > surprises for people who start learning Scheme.

> In practise, implementations will probably only ignore the
> first line, if it starts with a #!

> > Plus it would make all one-liners two-liners, which I think
> > would be rather inelegant.

> If we don't treat the first line specially, then all one-liners
> become two-file scripts in Unix.

-- 
Jens Axel S?gaard
Received on Wed Nov 15 2006 - 15:12:07 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC