(j3.2006) Finalization ordering question

Bill Long longb
Fri Oct 12 12:03:39 EDT 2007


This "arrays are just a collection of scalars" idea does not apply 
here.  The user can specify different final routines for scalar and each 
rank of array objects. As far as I can tell, said routines can do 
completely different things for each rank.  This provides for lots of 
shot-in-the-foot opportunities, and in the hands of a bad programmer 
could lead to almost incomprehensible code.

Cheers,
Bill


Aleksandar Donev wrote:
> Jim Xia wrote:
>   
>> That's how the standard defines the sequence of finalizations of an 
>> array of objects of extended type.  I wouldn't think of "efficiency" as 
>> an issue when finalizations are involved.
>>     
> Sure, but this does mean we should have rules that require 
> less-efficient code! Bill's suggested reordering makes sense to me, in 
> fact, that is how I would have implemented it: finalize one element 
> completely and then move on to the next one (after all, an array is just 
> a collection of scalars and requiring a specific order of the elements 
> seems contrary to what we usually do). There may be some other reason 
> why things are written the way they are...Malcolm or Kurt would know :-)
> Aleks
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>   

-- 
Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

            




More information about the J3 mailing list