[r6rs-discuss] [Formal] eliminate library export immutability loophole

From: AndrevanTonder <andre>
Date: Mon Mar 19 10:09:10 2007

By the way, I believe some of the wording in section 6.1 is confusing:

   All explicitly exported variables are immutable in both the exporting and
   importing libraries. It is thus a syntax violation if an explicitly exported
   variable appears on the left-hand side of a set! expression, either in the
   exporting or importing libraries. All other variables defined within a
   library are mutable.

This last sentence is incorrect (in fact it is contradicted right away in the
paragraph that follows this one).

Also, at another point the document states

   The transformer expressions and transformer bindings are created from left to
   right, as described in chapter 8. The variable-definition right-hand-side
   expressions are evaluated from left to right, as if in an implicit letrec*,
   and the body expressions are also evaluated from left to right after the
   variable-definition right-hand-side expressions. A fresh location is created
   for each exported variable and initialized to the value of its local
   counterpart.

Someone who reads this might rightfully ask how the set of exported
variables is determined. Although I think the last sentence is logically
correct, since it can be satisfied in a simple implementation by simply
potentially doing too much, e.g., creating an export location for all
non-mutated variables, the statement might trip up some readers.

Andre
Received on Mon Mar 19 2007 - 10:08:29 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC