Am Mi., 10. Feb. 2021 um 11:54 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:
>     - If #! is followed immediately by a horizontal whitespace character,
>     read datums until end-of-line. If exactly one datum was read, and it's
>     either an empty list or a pair, return it. Otherwise wrap any and all
>     datums in an implicit list and return that list.
>
> That's bad IMO because of the implicit wrapping in pairs, which only
> happens in some of the cases. This can destroy read-write invariance. If
> you want to make it possible for more than one datum to follow, enclose
> everything uniformly in a list.

That's true. It's hard to find a compromise that works well from both
Lisp tradition's and line-oriented parsers' perspective, as
S-expressions are fundamentally not line-oriented.

Indeed, and that's why it is IMO a fundamental flaw to mix these two things.
 
> The SRFI would, however, still be built on the wrong assumption, namely
> that everything that usually follows "#! " in a Scheme file is parsable
> as a sequence of datums. The elements in a shebang don't have to be
> parsable as such. Let "#! " return what it reads as a string. The string
> has to be parsed, of course, but this shouldn't be done by the Scheme
> reader because the string does not necessarily consist of Scheme syntax.

That does make some sense. In that case we could have different parsing
rules for the line of text that follows.

However, it doesn't solve the fundamental problem that magic comments
encode data using an internal, ad-hoc syntax similar to programming
language syntax. So it's like embedding XML inside S-expressions: XML
does the same job, but in a gratuitously different way, leading to a
confusing and IMHO aesthetically displeasing result :)

Sure, magic comments encode data using some format. But this format doesn't necessarily follow the Scheme syntax, and even if it does, it is just superficial.
For example, Emacs would allow me to write:

#! Local Variables:
#! x: 3
#! End:
and

#! Local Variables:
#! x : 3
#! End:

As datum sequences, however, `x: 3` and `x : 3` are quite different.