(j3.2006) Finalization ordering question
Aleksandar Donev
donev1
Wed Oct 24 16:39:56 EDT 2007
On Wednesday 24 October 2007 12:15, Jim Xia wrote:
> Another problem is you're dealing with a non-contiguious array here in
> calling the parent's finalizer.
You are just pointing out that this whole "higher rank finalizer" business is
ill-designed...I couldn't agree more. As I said, I believe FINAL routines
should have been treated more closely with type-bound procedures. That would
have made the dummy polymorphic, so it would effectively always be
non-contiguous (since you never know how large the dynamic type is anyway).
The existing design requires the opposite, that the (single) dummy be
non-polymorphic...
BUT, that said, the only thing that does make sense is for the same thing to
be done with the parent that is done with the object itself. They are one and
the same thing but viewed through a different lense. This is a basic OOP
principle.
Does anyone have an example where non-elemental finalizers are in some way
better than elemental ones? There is an example in C.1.8 but there is nothing
there that requires rank-1 stuff. From what Malcolm said it seems there was
some issue about there not being impure elementals at the time. But why does
there have to be an elemental procedure at all? Isn't any scalar procedure
enough---just call it element-by-element.
Aleks
More information about the J3
mailing list