To: J3 J2/02-106r1.txt From: Subgroup C Subject: Abstract interfaces are unnecessary Date: 28 February 2002 Section 1 Introduction Abstract interfaces are unnecessary. You may recall that abstract interfaces were introduced to give explicit interfaces to procedure pointers, and later used to give explicit interfaces to deferred type-bound procedure bindings. Presumably, the reason to invent abstract interfaces was so as not to require a procedure of the same name as the interface to be a part of the program. It is, however, explicitly contemplated in the second paragraph of C.9.3 that one should be allowed to have interfaces for procedures that are not part of the program: A scoping unit is allowed to contain an interface body for a procedure that does not exist in the program, provided the procedure described is never referenced. The purpose of this rule is to allow implementations in which the use of a module providing interface bodies describing the interface of every routine in a library would not automatically cause each of those library routines to be a part of the program referencing the module. Instead, only those library procedures actually referenced would be a part of the program.... Therefore, it would be possible simply to use ordinary interface bodies, in ordinary interface blocks, to provide the explicit interfaces needed for procedure pointers and deferred type-bound procedure bindings. One could in fact go farther, and allow any entity with an explicit interface to provide interfaces for those entities. This proposal depends on the proposal, in 02-107r1 or its successors, that makes interface bodies local entities. Section 2 Edits \sep\begin{enum} \item[(6)] \mgpar{xiii, item(6)}Procedure pointers, \end{enum} \sep\mgpar{13:23+} {\secfont 2.2.3.5 Procedure entity} %\divn\paragraph{Procedure entity} A \tdef{procedure entity} is a dummy procedure, external procedure, interface body, internal procedure, intrinsic procedure, module procedure, procedure pointer\obs{, or statement function}. \sep\mgpar{44:13,16}[Editor: ``\st{abstract-interface-name}'' $\Rightarrow$ ``\si{interface-name}'' twice.] \sep\mgpar{44:20,22}[Editor: ``\st{abstract-interface-name}'' $\Rightarrow$ ``\si{interface-name}'' twice.] \sep\mgpar{45:5}[Editor: ``\st{abstract-interface-name}'' $\Rightarrow$ ``\sinr{interface-name}''.] \sep\mgpar{49:12}[Editor: ``\st{abstract-interface-name}'' $\Rightarrow$ ``\sinr{interface-name}''.] \sep\mgpar{55:20,56:5}[Editor: Delete ``abstract'' twice.] \sep\mgpar{237:10}[Editor: ``interface blocks'' $\Rightarrow$ ``interfaces''; delete ``, abstract interfaces''.] \sep\mgpar{244:13}[Editor: Delete.] \sep\mgpar{245:12-13}[Editor: Delete ``An interface ... {\bf interface}.''.] \sep\mgpar{245:15-16}[Editor: Delete ``PROCEDURE() or''; delete ``a generic \dots\ block''.] \sep\mgpar{245:22}[Editor: Delete ``or abstract interface''.] \sep\mgpar{249:4-7+}[Editor: Delete 12.3.2.1.4.] \sep\mgpar{250:6,15}[Editor: ``\st{abstract-interface-name}'' $\Rightarrow$ ``\sinr{interface-name}'' twice.] \sep\mgpar{250:16}\dcons [C1212]% Richard: Delete this line {% Richard: Keep this line. BTW, if you don't put a non-blank % immediately after the {, the % is necessary to keep from % having an excess blank in the output. (R1215) % Richard: Delete this line and uncomment the next one. %(\snref{interface-name}) The \si{name} shall be the name of a procedure entity (2.2.3.5) %(\ref{D2:Procedure entity}) that has explicit interface. If it is an entity declared by a PROCEDURE statement it shall be previously declared. If the entity is an intrinsic procedure the \si{name} shall be the specific name of an intrinsic procedure that is listed in \ref{D13:Specific names for standard intrinsic functions} and not marked with a bullet ($\bullet$).} [Alternate C1212:] \dcons [C1212]% {% (R1215) %(\snref{interface-name}) The \si{name} shall be the name of an interface body.} \dcons [C1212$\frac12$]% {% (R1215) %(\snref{interface-name}) The \si{name} shall not be the same as a keyword that specifies an intrinsic type.} \sep\mgpar{250:26,28}[Editor: ``\st{abstract-interface-name}'' $\Rightarrow$ ``\si{interface-name}'' thrice.] \sep\mgpar{251, Note 12.15 line 1}\cf{INTERFACE}\\{} [Editor: Move body of note 12.11 to here, while deleting ``abstract'' twice (at third and eighth lines).] \sep\mgpar{264:15-17}\dcons[C1236]{(\snref{proc-language-binding-spec}) If a NAME= specifier appears in the \si{proc-language-binding-spec} in the \si{function-stmt} or \si{subroutine-stmt} of an interface body, the interface body name shall not be the name of a dummy procedure, the \si{interface-name} in a \si{procedure-declaration-stmt}, the \si{interface-name} in a \si{proc-component-def-stmt} (\ref{D4:Derived-type definition}), or the \si{interface-name} in a \si{specific-binding} (\ref{D4:Derived-type definition}).} \sep\mgpar{382:6}[This instance of ``abstract interfaces'' is replaced by ``interface bodies'' in 02-107r1. No change is needed here.] \sep\mgpar{387:12}[Editor: ``interface blocks'' $\Rightarrow$ ``interfaces''; delete ``, abstract interfaces''.] \sep\mgpar{387:32}[This item is replaced by ``The name of an interface body'' in 02-107r1. No change is needed here.] \sep\mgpar{405:8}[Editor: ``procedure, abstract interface'' $\Rightarrow$ ``procedure entity,''.] \sep\mgpar{409:23+}{\bf procedure entity} (2.2.3.5) %(\ref{D2:Procedure entity}) : a dummy procedure, external procedure, interface body, internal procedure, intrinsic procedure, module procedure, procedure pointer\obs{, or statement function}. \label{lastpage} \end{document}