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

> I would change the title of this thread as reader flags are something
> different than semantic markers of data or code. And `#! /usr/bin/env
> fantastic-scheme` is not even a reader flag.

An email subject is just an approximation. At least we make an effort to
change them every now and then :-)

> If you look for a way to attach meta-information to a Scheme file that
> is not part of the contained data, you may want to reuse Emacs-style
> comments (think of file-local variables) for this purpose.

I sound like a broken record, but parsing magic comments in S-expression
files is unfortunate since the whole point of S-expressions is to be a
generic, extensible encoding for all kinds of information. For things
meant to be parsed it's better to coin a new top-level form instead.

In Scheme we even have S-expression comments #; which can be used as a
temporary hack to ignore metadata forms as Scheme code. Or a one-line
macro that expands to a no-op.