Re: Reader flags to indicate different kinds of files Lassi Kortela 29 May 2020 17:09 UTC

> The magic comment may contain an s-expression as well (which is the
> case for Emacs). It's no more different than hiding an s-expression
> behind "#;".

It is quite different -- "#;" is officially followed by an S-expression
according to Scheme's grammar. ";" is followed by free-form text.
Parsing an S-expression after ";" requires us to establish a convention
which will only be followed by some ";" comments. Whereas any Scheme
parser will check all "#;" comments for correct read syntax. Syntax
highlighting and "move forward/backward" commands in editors can also be
different.

The main thing common between "#;" and ";" is that they are not meant to
be interpreted by computers.

> We are talking about meta-information here; it should not be
> necessarily part of the actual data. Comments are therefore a good
> place to put them.

I disaree: comments are meant for human-readable text whose contents are
not interpreted by computer. Metadata on the other hand tends to be
useful to parse by computer. Magic comments make parsing and other
tooling needlessly difficult and brittle.