To: J3 J3/23-185 From: T. Clune & subgroup generics Subject: F202Y Use of kewords with deferred procedure arguments Date: 2023-June-13 Reference: 23-155 Introduction ============ The introduction of REQUIREMENT/REQUIRES into the feature set for generic programming has exposed an unfortunate issue that requires resolution. More specifically, the use of REQUIRES statements permits multiple specifications of the interface of a deferred procedure whose arguments all have consistent characteristics, and yet have different argument _names_. This then raises the issue of whether keyword association can be used when referencing a deferred procedure. Discussion ========== Subgroup has considered various resolutions to this problem, and none have universal support. The existing syntax paper, 23-155, implicitly disallows use of keywords in references to deferred procedures by virtue of not defining the argument names for the "intersection" of overlapping specifications. This approach is backwards compatible with most of the alternatives and was thus chosen as a safe baseline. Alternative 1: Require all specifications of a deferred procedure to use the same argument names. This is problematic because we expect individual requirements to developed independently in many instances. Alternative 2: Allow keyword association when all specifications of a deferred procedure, but otherwise disallow. This is fragile, but at least allows some developers to use keywords in this context. Alternative 3: Provide some means to identify which specification determines the argument names for keyword association. E.g., if the template has an explicit specification at the top level that could serve as the "definitive" interface. But we have also considered adding an attribute to a REQUIRES or an INTERFACE that selects the specification that provides the argument names. Proposal ======== Subgroup would like to continue to evaluate alternatives to the baseline syntax with regard to allowing use of keywords in deferred procedure references inside templates. ===END===