Formal comment #93 (defect) Protocol environment Reported by: Andre van Tonder Component: records Version: 5.91 Summary: The environment for the protocol is not well specified. Description: On page 70, the description: (protocol ) is evaluated in the same environment as the define-record-type form, ... does not clarify whether the protocol can refer to the predicates and accessors of the same record type being defined. In other words, is the following possible? (define-record-type point (fields (immutable x) (immutable y)) (protocol (lambda (p) (case-lambda ((x y) (p x y)) ; ordinary constructor ((pt) (p (point-x pt) ; copy existing point (point-y pt))))))) Here the usages of point-x and point-y are supposed to be the ones being defined in the same define-record-type. This is a very useful and reasonable thing to do. Suggestion: Let the protocol be evaluated in the scope of the bindings of the constructor, predicate, accessors and mutators being defined in the define-record-type expression. RESPONSE: The comment was withdrawn as per http://lists.r6rs.org/pipermail/r6rs-discuss/2006-November/001064.html