(j3.2006) About extending abstract types with deferred bindings

Van Snyder Van.Snyder
Wed Sep 7 16:01:37 EDT 2016


I don't see any harm in extending an abstract type that has a private
deferred binding in a different module from where it is defined.

Objects of the extension type can't invoke the deferred binding, even
using an ancestor component.

Is there a prohibition against invoking an accessible deferred procedure
binding using an abstract ancestor component of a non-abstract object?
I don't see one in 15.5.1.  Do we need a constraint something like this?

C1534a (R1523) The <binding-name> shall not be deferred.

You might at first suspect that it's impossible for the <binding-name>
to be deferred, but the <data-ref> might be to an abstract ancestor
component of an object of non-abstract type, and that abstract-type
ancestor might have a deferred binding.

On Wed, 2016-09-07 at 16:59 +0000, Lionel, Steve wrote:
> F08/0052 (see http://j3-fortran.org/doc/year/11/11-207r1.txt for final
> wording) discusses an abstract type with a private, deferred
> type-bound procedure and asks about extending that type in another
> module that makes the type accessible by use association. The interp?s
> edit adds the words ?an accessible? to:
> 
>  
> 
> If a specific type-bound procedure specified in a type definition has
> the same binding name as an accessible
> 
> 3 type-bound procedure from the parent type then the binding specified
> in the type definition overrides the one
> 
> 4 from the parent type.
> 
>  
> 
> I can follow that. However, the text and answer to Q3 say,
> respectively, ??the
> 
> definition of type t2 would seem to be defective in that (7) must be
> 
> defining a new type-bound procedure, and not overriding the type-bound
> 
> procedure defined at (6), and that therefore t2 still has a deferred
> 
> type-bound procedure.  That would mean that an abstract type with a
> 
> private deferred type-bound procedure could not be extended outside of
> 
> the module in which it is defined: is that correct?? and
> 
>  
> 
> ?Yes, an abstract type with a private deferred type-bound procedure
> 
>     cannot be extended outside the defining module, because it is
> 
>     otherwise impossible to override the private type-bound
> procedure.?
> 
>  
> 
> This clearly suggests that there is a rule specifying that all
> deferred bindings in an abstract type must be overridden when
> extended, but I can?t find it and I have tried many ways to search in
> F2003, 2008 and 16-007r2. Yet it must be there somewhere as the interp
> references it and Intel Fortran insists it be followed. What have I
> missed?
> 
>  
> 
> This comes up because a couple of our customers bemoaned the
> restriction in F08/0052, saying ?The result of the interp results in a
> capability gap for authors when they want a binding that can be
> overriden but not invoked?, and asked that such a capability be
> provided in a future standard.
> 
>  
> 
> Steve Lionel
> 
> Intel Developer Support
> 
> Merrimack, NH
> 
>  
> 
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20160907/0309ec3a/attachment.html 



More information about the J3 mailing list