Re: Script semantics and declarations Lassi Kortela 28 Jun 2021 07:09 UTC

For compatibility, instead of

(declare-file ...)

one can use:

#;
(declare-file ...)

or in Common Lisp:

#+(or)
(declare-file ...)

or in Clojure:

#_
(declare-file ...)

or add (define-syntax declare-file ...) or (defmacro declare-file ...)
at the top of the file, so that the implementation knows to skip it.

- If we specify (language r7rs) then the script promises to be a
conforming R7RS top-level program.

-  If we specify both (language r7rs) and (implementation a b c) then
the script writer has promised that he wrote a script compatible with
the r7rs modes of implementations a, b, and c. Those modes can be a
superset of R7RS top-level program semantics, so if the script writer
knows those particular implementations, he can leverage any extensions
that are useful.

- If we specify (language scheme) instead of (language r6rs) or
(language r7rs) then the implementation doesn't need to conform to RnRS
at all, which will surely be useful in some cases.