J3/15-107 To: J3 Subject: Purity and explicit interface From: Van Snyder Date: 2014 December 29 Reference: 15-007 1. Introduction =============== Subclause 12.4.2.2, p1(1)(b), requires a procedure to have an explicit interface if a reference to it appears in a context that requires it to be pure. This doesn't include appearance as an actual argument (because that's not a reference). Constraint C1293 requires the interface of a procedure to be pure if it is used in a context that requires it to be pure. This includes appearance as an actual argument. Subclause 12.4.2.2, p1(1)(b), requires intrinsic procedures to have explicit interface if they are referenced in a context that requires them to be pure. C1293 explicitly exempts intrinsic procedures from this requirement. It would be helpful if 12.4.2.2 p1(1)(b) were consistent with C1293. 2. Edits ======== [283:21-23 12.4.2.2p1(1)] Replace list item (1): "(1) a reference to the procedure appears with an argument keyword (12.5.2), or (1a) the designator of the procedure appears in a context that requires it to be pure (12.7), " {Rather than agonize over why 12.4.2.2, p1(1)(b), requires intrinsic procedures to have explicit interface if they are referenced in a context that requires them to be pure, but C1293 explicitly exempts intrinsic procedures from this requirement, it's easier to simplify C1293, and specify that intrinsic procedures have explicit interface.} [318:17-18 C1293] Replace the first sentence of the constraint with "If the designator of a procedure \obs{that is not a statement function} appears in a context that requires it to be pure, then its interface shall be explicit in the scope of that appearance." [331:3+ 13.7.1p1+] Insert a paragraph: "All intrinsic procedures have explicit interface."