J3/15-234 To: J3 Members From: Van Snyder Subject: Clarifying generic bindings Date: 2015 October 07 1. Introduction =============== Maybe the way type-bound generic interfaces work is abundantly clear to some, but I found it to be confusing. It could use some explanation. Notes are proposed here. Maybe it should be normative. 2. Edits ======== [15:15 1.3.115.6] Insert "or generic interface" after "procedure". After "derived type" insert ", or inherited from its parent type and not overridden," {4.5.5p3 at [76:33-34] specifies that a type-bound generic interface is a type-bound procedure. That part of the edit isn't technically needed, but it is helpful.} [80:11- NOTE 4.55+] Insert a note: " NOTE 4.55a Where a generic interface is inherited, it specifies that the names of specific procedure bindings to the extension type, as they are specified or inherited in the parent type, are part of the generic interface bound to the extension type. If a specific procedure binding is inherited and not overridden (4.5.7.3), it is part of the inherited generic interface. If a specific procedure binding is overridden the overriding binding is part of the inherited generic interface and the inherited binding is not. " [311:11+ 12.5.6p3+] Insert a note: " NOTE 12.43a As a generic interface is inherited (4.5.7.2) into an extension type, it is useful to think of it as having added a row to a two-dimensional array. Each column of the array is identified by the charactistics of a procedure. The rules in 12.4.3.5.5 ensure that columns' identities are distinct. Each row of the array is identified by the dynamic type of the . When a generic type-bound procedure is referenced, the characteristics of the actual arguments, except for the declared type of the if the procedure has a passed-object dummy argument, select a column of the array, and the dynamic type selects a row. The declared type of the is not used for generic resolution if the procedure has a passed-object dummy argument because the reference might be to an inherited specific binding, for which the declared type of the passed-object dummy argument is necessarily an ancestor type. "