J3/14-145 To: J3 Subject: Function reference syntax work item proposal From: Van Snyder Date: 2014 May 02 Reference: 14-007 1. Introduction =============== After prolonged e-mail exchange, the consensus appears to be that we will not allow type-bound procedures to be actual arguments or procedure pointer targets. Therefore, if a function designator of the form %, i.e., without an empty argument list, were allowed, and it were to appear as an actual argument, or a target in a pointer assignment statement, there could be no ambiguity whether the function ought to be invoked, or the function itself is the relevant entity: The function is to be invoked. If references to type-bound functions that have no arguments (other than the passed-object argument) were allowed without an empty argument list enclosed in parentheses, it would be irrelevant to the syntax whether the named entity is a component or function. Programs would thereby be more mutable. In addition, the EVENT_QUERY intrinsic function in TS 18508 would not be needed. Rather, COUNT could be defined to be a function with an integer result and no arguments (other than the passed-object argument), bound to EVENT_TYPE, or it could be defined to be an integer component with appropriate constraints to protect it against tampering. That definition could be changed in the future without affecting existing programs because in both cases it would be referenced as %COUNT. 2. Proposal =========== Revise R1219 to allow to reference a type-bound function that has no arguments (other than the passed-object argument) without an empty argument list enclosed in parentheses. 3. Draft edits to 14-007 to estimate scope of the project ========================================================= [292:14+ R1219+ 12.5.1] Add an alternative for R1219 : "<> %" No changes are needed elsewhere; in particular none are needed in 12.5.2.1p1.