Email list hosting service & mailing list manager

Second round of proposals for directives Lassi Kortela (17 Feb 2021 08:34 UTC)
Re: Second round of proposals for directives Marc Nieper-Wißkirchen (17 Feb 2021 08:53 UTC)
Re: Second round of proposals for directives Lassi Kortela (17 Feb 2021 09:25 UTC)
Re: Second round of proposals for directives Lassi Kortela (17 Feb 2021 09:43 UTC)
Re: Second round of proposals for directives Marc Nieper-Wißkirchen (17 Feb 2021 09:51 UTC)
Re: Second round of proposals for directives Lassi Kortela (17 Feb 2021 10:11 UTC)
Re: Second round of proposals for directives Marc Nieper-Wißkirchen (17 Feb 2021 10:31 UTC)
Re: Second round of proposals for directives Marc Nieper-Wißkirchen (17 Feb 2021 09:44 UTC)
Re: Second round of proposals for directives Lassi Kortela (17 Feb 2021 10:01 UTC)
Re: Second round of proposals for directives Marc Nieper-Wißkirchen (17 Feb 2021 10:43 UTC)
Re: Second round of proposals for directives John Cowan (18 Feb 2021 02:56 UTC)
Re: Second round of proposals for directives Marc Nieper-Wißkirchen (18 Feb 2021 10:37 UTC)
Re: Second round of proposals for directives Vladimir Nikishkin (18 Feb 2021 15:42 UTC)
Re: Second round of proposals for directives Marc Nieper-Wißkirchen (18 Feb 2021 15:51 UTC)

Re: Second round of proposals for directives Lassi Kortela 17 Feb 2021 10:01 UTC

> I don't think it is a good idea to try to unify things that need not
> have anything to do with each other. The standardized "#!"-directives
> affect the reader (or, rather, the textual port to which the reader is
> attached) while it parses tokens and they are related to editor format
> settings or license information as much as any other type of lexical
> syntax appearing in the source (namely not a bit).

The #! directives are not all about the reader; it varies a lot.

An #!(encoding ...) directive would definitely affect the reader.

#!key #!optional #!rest are just keywords written in a way that looks
like they're directives.

#!bwp and #!eof are objects written in a way that looks like directives.

#!nocache and #!no-overwrite don't affect the reader, but they affect
Sagittarius in general.

In sum, there's no particular consistency about it.

(Examples from https://registry.scheme.org/#hash-bang-syntax)

>     The existing RnRS syntax requires that #!<identifier> has no whitespace
>     in between.
>
> Here, <identifier> does not stand for a datum (according to the
> production rule <symbol> -> <identifier>) but just for a specific
> non-terminal in the RnRS grammar.

It could make sense to restrict #!<datum> to #!<identifier> or
#!(<identifier> <datum> ...), with possible future extensions.

> You can comment out comments of some kind. For example, ";;>" can be
> commented out through "; ;;>". My example prefix ";*" can also be
> commented out through "; ;*".

Yes, there are hacks for rendering magic comments ineffective but magic
comments are a hack to begin with since all comments are supposed to be
ignored. The Right Thing aesthetic followed by Scheme and Lisp is to
solve problems in a more principled way.

If we write some directives in comments, we have no syntax strictly for
ignoring things.

It's also not the case that magic comments are only for external tools.
Kawa and Gauche already parse encoding comments. This is a good example
of how blurry the line is between "belongs to Scheme" and "doesn't
belong to Scheme".