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

From: Alan Watson <alan>
Date: Wed Nov 15 16:10:17 2006

Anton van Straaten wrote:
> It may be worth noting that one difference between the case for C and
> for Scheme is that all the Scheme compilers which currently aim for R5RS
> compliance (and some that don't) also include "interpreters" that are
> capable of executing a source file without requiring a separate compile
> step. So the degree of applicability of the notion of scripts is far
> greater across all relevant Schemes, than it is for most C implementations.

Yes, but in my opinion at least, one of the most interesting
implementations in the last decade or so is stalin, which is most
certainly not an interpreter. It doesn't aim for R5RS compliance, though.

One can take almost any compiler and convert it into a "script engine"
by simply compiling the script into a temporary executable, executing
the executable, and deleting the executable. However, a number of
current compilers also include interpreters (e.g., Chicken, Guile, and
Bigloo, last time I looked). For fairly obvious reasons, these
interpreters often are slower or more limited than the compiler. I think
most people would consider these interpreters to be more suitable for
running scripts.

Now, I think in most cases those interpreters are there more to provide
a REPL than to provide an interpreted script engine. There seems to be a
trend away from a REPL in the draft R6RS. Therefore, one might also
expect a trend away from providing interpreters, at least in some
implementations.

Regardless, my point is not to assert that "no Scheme programs are
scripts". Some are, and some are not, and forcing all of them to look
like scripts is unnatural.

Regards,

Alan
Received on Wed Nov 15 2006 - 16:08:33 UTC

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