Am Mi., 10. Feb. 2021 um 14:12 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:
> So what *is* the goal of SRFI 220?

- Using S-expressions to represent the set of magic directives that
parse easily as S-expressions.

Even for those that parse as S-expressions, there is no bijection. See my Emacs local variable example. To me, it is like using round screws with square holes.
 
- Ideally, unifying other people's magic directives with RnRS directives
into a common framework.

I don't see a value in that.
 
It may be useful to have them elsewhere in the file, e.g. at the end,
not only at the beginning. And reading some syntax only at the beginning
of a stream is a similar irregularity as parsing until end of line; I
think the latter is a bit simpler.

I don't think so. The shebang syntax is not what is fed into the read procedure. It is conceptually stripped first when the Scheme interpreter loads an executable *file*.
 
The #! <datum> format is probably something we should have eventually in
any case, but how exactly to combine it with the present proposal is
still unclear.

At least this should be made clear for future compatibility.

 
>     The portable Unix shebang lines are basically:
>
>     #! /bin/sh
>     #! /usr/bin/env foobar
>
> Change my example to
>
> #! /usr/bin/env (-scheme

What does the example mean? Unix commands should have alphanumeric names
(optionally with dashes, dots, and underscores). There are lots of
things that don't cope well with other stuff.

The line gets interpreted by the kernel. And for the kernel, (-scheme is a valid file name.