Re: Reader flags to indicate different kinds of files
Lassi Kortela 29 May 2020 17:26 UTC
> How about this convention for metadata?
>
> #;;
> ((language chibi) (version 0.8))
I didn't know you can have arbitrarily many semicolons after "#;".
According to the grammar:
- the thing that comes after "#;" is "intertoken space"
- free-form ";" comments are one kind of intertoken space
- So it parses as "#;" ";" ((language chibi) (version 0.8))
While I like "#;" based solutions a lot better than parsing free-form
comments, I would still advocate extending the language proper by making
a new macro. The end result is much cleaner in the long run.
Clojure has a system for adding metadata to any S-expression I think.
Paul Graham's Arc also had it (I think it was called tag/rep) at least
in some early version.