[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] R7RS 7th draft available
Alan Watson scripsit:
> Thanks for your reply. OK, so if I understand correctly, they are
> primitive expressions in addition to being a library declarations.
> (a) In that case you probably want to add them to the <expression>
> definition in §7.1.3, in which the other primitive expressions appear.
> (b) §4.1.7 says that the contents of the file are wrapped in a
> "top-level begin". I've looked for a definition of "top-level"
> without much luck. §5.3.1 appears to define top-level definitions,
> but it actually just says that that are definitions "at the top level",
> without further elaboration. §5.7 mentions the top-level environment
> for the REPL. However, I can't find a definition with regards to
> syntax. I presume a syntactic form is in a top-level context if it
> is in a <command or definition> context or a <library declaration>
> context. You might add this definition at a suitable point.
I've removed references to "top level" in favor of "global" (for environments)
or "outermost" (for syntax). Hopefully that will be clearer.
> (c) §5.7 says that optional REPL allows import declarions, expressions,
> and definitions to be entered and evaluated. I think it would be
> equivalent but more concise to say that they allow a <program> to be
> entered. If you don't make this change, I think you need to extend
> the definition of "top-level" mentioned in (b) to include the REPL.
The formal syntax for <program> was obsolete: the prose specification
now requires import declarations to come first. What is more, the formal
syntax incorrectly allowed the library declaration `begin` (as distinct
from the program `begin`) to contain only commands and definitions,
rather than any library declarations.
> (d) Also, do you want to clarify the behavior of include and
> include-ci in contexts that are not top-level contexts? For example,
> this expression:
> (let () (include "foo"))
> Does the "include" magically convert its context into a top-level
> context? Or rather does the standard define its behavior if and only
> if it appear in a top-level context?
I changed the wording to "splice the results into the current context"
and removed the reference to `begin`. The intention is that they
will work anywhere.
I personally consider it good style to avoid these as ordinary syntax,
and use them only in `define-library`.
> (e) §4.2.3 includes the text "<top-level>", which looks like a
> reference to a syntax variable, but I cannot find the definition of
> such a variable elsewhere.
Changed to "outermost level of a program, or at the REPL".
> (f) §4.1.6 is missing a "the" in "enclosing the set! expression or at
> [the] top level".
Changed to "or else globally".
John Cowan cowan@x http://ccil.org/~cowan
Original line from The Warrior's Apprentice by Lois McMaster Bujold:
"Only on Barrayar would pulling a loaded needler start a stampede toward one."
English-to-Russian-to-English mangling thereof: "Only on Barrayar you risk to
lose support instead of finding it when you threat with the charged weapon."
Scheme-reports mailing list