J3/13-212 To: J3 From: Van Snyder Subject: Resolve generic without invoking Date: 2013 December 19 Reference: 04-273, 12-195; 2004 hate-dislike-like-love score 0-1-13-0 Title: Resolve generic without invoking Submitted by: Van Snyder Status: For consideration Basic functionality: Resolve a generic name to a specific procedure without evaluating expressions or invoking the specific procedure. Rationale: With care and diligence, one can develop a program so that related sets of variables, constants and function results are parameterized by kind type parameters. In order to change the kind of that set of entities, one need only change the values of named constants -- almost: Generic procedures cannot be actual arguments or procedure pointer targets. Thus, any specific procedures that are actual arguments need to be public, and if one needs to change the program, in addition to changing named constant definitions, one needs to find all places where a specific procedure that operates on the entities in question is an actual argument or procedure pointer target, and manually edit those appearances. Estimated impact: Minor Markham M6 conformance: Remove simple deficiency and discrepancy. Detailed specification: Define a new syntactic device, for example [ ] that can appear only as an actual argument or the in a . Specify that it causes the to be resolved to a specific procedure without evaluating any expressions or invoking any procedures in the . Draft edits: To estimate scope of project Insert an alternative for R740 <> <> <> ... Insert a definition of R740a <> lbracket rbracket { Alternatives to enclosing the in brackets are, for example, enclosing it in << and >> or { and } or (% and %) or ....} C730a (R740a) shall designate a generic procedure or a generic binding. If it designates a generic binding, shall not be polymorphic. Insert an alternative for R1223 <> <> Insert a subclause <<12.5.7 Resolving generic pointer targets and actual arguments>> If a is an or a in a , the is resolved to a specific procedure using the types, kinds, and ranks of the as if they were arguments in a reference to a procedure with that designator, as specified in 12.5.5.2. Expressions in the shall not be evaluated, and procedures in the shall not be invoked.