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

From: John Cowan <cowan>
Date: Wed Nov 15 09:29:51 2006

Jens Axel S?gaard scripsit:

> The compromise:
>
> * If the first line starts with #!, ignore the first line
>
> has the consequence that a portable script won't run on Unix.

Lots of Perl programs begin with "#!/usr/bin/perl -w", but if it
so happens that your Perl is in /usr/local/bin/perl, they aren't
portable to your system either. Small tweaks like adding a
locally correct "#!" line are an accepted part of life.

> The plus side is, that a script written for Unix will run
> on other systems.

I think we have three proposals, any of which is viable:

1) Ignore the first line if it begins with "#!".

2) Make "#!" a general comment start, like ";".

3) Make "#!...!#" a general pair of comment delimiters.

I favor the first, because it has the smallest impact on the
rest of the language.

-- 
Business before pleasure, if not too bloomering long before.
        --Nicholas van Rijn
                John Cowan <cowan_at_ccil.org>
                    http://www.ccil.org/~cowan
Received on Wed Nov 15 2006 - 09:29:43 UTC

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