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

Arthur A. Gleckler arthur at zurich.csail.mit.edu
Thu Nov 16 11:45:34 EST 2006


On Nov 16, 2006, at 8:38 AM, Per Bothner wrote:

> I think it is useful that it be possible to write a conforming R6RS
> program that is at the same time a valid Unix/Posix script.  That
> requires some minimal standardization in R6RS.  Non-Unix  
> implementations
> need to not get confused by a Unix script header.

It doesn't require standardization in R6RS.  An SRFI is a perfect  
place for this sort of operating system-specific thing.  RnRS has  
always been very careful not to introduce this sort of non-portable,  
operating system-specific behavior.

And why should Unix implementations own the top line of every script  
file?  What happens when another operating system wants control over  
the top line?

> It is also useful to have a standard header so a Scheme file can be
> identified by content, rather than just file extension, which is
> unreliable.  But that requires a standard header for libraries as  
> well,
> though it need not and probably should not be the same header.

Identification of file type by content is no more reliable than by  
extension, and almost certainly less so.



More information about the r6rs-discuss mailing list