Re: SRFI 220: Line directives
Lassi Kortela 19 Feb 2021 07:16 UTC
> I haven't said that the shebang line is to be ignored by the Scheme
> implementation that runs a script. What I have said is that that line
> mustn't be passed to the Scheme reader. It has to be already stripped in
> a lower level (in the sense of the OSI layers).
#! directives are not passed to the Scheme reader in the same way as
ordinary datums are. They are passed to the internal part of the reader
that handles directives. Some of those directives are converted to
datums (e.g. #!eof and #!bwp) but not all.
If a `#! ...until end of line ...` read syntax were added to Scheme,
then that string would be passed to the directive reader as well. Not to
the ordinary datum reader.
It's a matter of taste whether or not "#!/" Unix shebang lines without a
space in between the "#!" and "/" should get special treatment in the
reader. I don't think it's that important: programmers can add a space.
A more controversial issue is whether a general "#! ..." read syntax
should exist at all.