[r6rs-discuss] Remaining inconsistencies: libraries and macros
I am wondering if my interpretation of the r6rs draft is correct in
the following cases. According to a strict reading of the draft definition of
free-identifier=?, the following example should be correct, and should be
portable (Matthew?):
(library (foo)
(export)
(import (except (r6rs base) define)
(for (only (r6rs base) define))) ; imported, but for no levels
(define x 1) ; works because free-identifier=? is level-blind
(display x)) ==> displays 1
as should be
(library (foo)
(export)
(import (except (r6rs base) define)
(for (only (r6rs base) define) (meta 42)))
(define x 1)
(display x)) ==> displays 1
They should be correct and portable because free-identifier=? is required by
the draft to be level-blind. I am assuming that definitions are discovered
using free-identifier=?, which is the only way I can imagine doing it.
Am I right that the above is portably correct?
Even if definitions are not discovered using free-identifier=?, I assume
that SET! clauses in identifier-syntax must be.
If so, then there are some imprecisions in the draft specification of
export levels. Specifically, if I am right, the (rnrs base)
export of SET! for level 1 is redundant, and likely to confuse users.
If the authors wish to unnecessarily export SET! for level 1, then it
is inconsistent that they do not explain why they are not exporting
CAR for level 1, or indeed for level 25 :-) SET! only needs to be exported
for level 0.
Not only that, but the exports of (r6rs base) of _ and ... for level 1 are
also redundant. Indeed, (r6rs base) must export _ and ..., but only needs to
do so for for no levels (which is different from not exporting them).
Andre
Received on Sat Jul 07 2007 - 20:23:19 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC