(j3.2006) Implicit assignment of objects of extended types

Tom Clune Thomas.L.Clune
Fri Oct 16 09:41:29 EDT 2015


Attached below is a motivating example of my objection to the interp we discussed on Tuesday. (Paper 218 I think.)

I also have a few additional arguments to bolster my case.

1)  If I understand correctly, the semantics of finalization work on the base object, not on the components of the base object.  In 15-007r2.pdf  4.5.6.2 The finalization process (78:19), we have:  

?If the entity is of extended type and the parent type is finalizable, the parent component is finalized.?

The proposed interp seems to run contrary to this treatment of the base as a coherent entity.

2) Not that it really matters, but C++ implicit copy/assignment semantics also use the copy/assignment operator for the base object, not its components.

3) Just to reiterate my point on Tuesday.   The proposed interp in 218 adds considerable burden to implementors of type extensions.   If a base type overrides default assignment, then the type extension almost certainly must as well, or risk ruining some invariant property that the base otherwise preserves.  Further, this burden propagates down the inheritance hierarchy.  Perhaps on some occasions, the implementor may find that default assignment is actually ok, but it would require looking ?inside? the base type implementation.  (And I cannot construct a plausible motivating example of this situation, though I?ve also not tried very hard.)





Thomas Clune, Ph. D. 	<Thomas.L.Clune at nasa.gov <mailto:Thomas.L.Clune at nasa.gov>>
Software Infrastructure Team Lead
Global Modeling and Assimilation Office, Code 610.1
NASA GSFC		
MS 610.1 B33-C128
Greenbelt, MD 20771
301-286-4635













-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20151016/511258a3/attachment-0002.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intrinsic_assignment.F90
Type: application/octet-stream
Size: 1777 bytes
Desc: not available
Url : http://mailman.j3-fortran.org/pipermail/j3/attachments/20151016/511258a3/attachment-0001.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20151016/511258a3/attachment-0003.html 



More information about the J3 mailing list