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

From: AndrevanTonder <andre>
Date: Thu Nov 16 11:16:19 2006

On Thu, 16 Nov 2006, Anton van Straaten wrote:

>> The only thing that really needs to be in the Scheme report is
>> the grammar for <script substance>.
>
> Does this mean that you would also object to specifying that lines beginning
> with "#!/" be considered comments? (This was one of the more viable options
> considered by the editors, and has also been raised in this thread.)

I would still object if I have to include it in all those applications that I
don't intend to run as Unix scripts (i.e., all my applications).
If, on the other hand, I don't have to include it to produce a well-formed
program, then it has no business being in r6rs, so in that case I would also
object to it.

> Also, do you object to specifying a standard interpreter name, such as
> "scheme-script"?

Yes, as I would object to specifying a standard compiler name, or standard
compiler options, or a standard way of invoking a compiled executable.

> Both of these things (or something equivalent) "really need to be in the
> Scheme report", for anyone who values the goal that they serve.

I would doubt that the goal is considered valuable by many Schemers, but then
the goal is not really clear. If the goal is portability of scripts as files
without modification, the goal is not satisfiable.

> The draft is proposing to standardize something which /every/ relevant Scheme
> implementation[*] has to deal with in practice, which every implementation
> deals with differently for reasons that aren't particularly good, and which
> many users are affected by.

I do not agree with any of these assumptions. Few implementations currently
feel any need to "deal" with Unix (or any other) scripts, yet most can easily
be persuaded to run scripts. Few Scheme programs are currently intended to be
run as scripts, and few users are interested in doing so. Of those who are,
few are so stupid as to be incapable of adding the trivial
implementation-specific topmatter-metadata on the couple of host systems that
require it.

This is a "solution" in search of a problem. At best, it addresses a couple of
people's pet issue. Everyone else is affected negatively.

Many more people are affected by the compiler name and swiches. Should r6rs
standardize that too? And what is the rationale for trying to address dragging
and dropping scripts as files between host systems while ignoring the same
issue for libraries, which will arguably affect more people?

R6RS should decide whether scripts are required to be whole files, or are
allowed to be part of files. There is language in the current draft that
appears to allow a Scheme script to be part of a file. If this is as intended,
then there is absolutely no need for any of us, or r6rs, to even have this
discussion about any non-scheme-script parts of the file, such as Unix
topmatter. There is only an issue if a Scheme script is required to be an
entire file, but this would, in my opinion, be a bad thing for r6rs to require.

Cheers
Andre
Received on Thu Nov 16 2006 - 11:12:17 UTC

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