[J3] [EXTERNAL] Re: Clarification on F18/017

Carlson, Neil nnc at lanl.gov
Mon Jun 8 19:36:06 EDT 2020


Steve wrote:
> > On 6/8/2020 6:40 PM, Ondřej Čertík via J3 wrote:

> To wit: what is wrong with the way F18/017 allows for different ordering
>of finalization and why is it wrong?


Neil just answered it here:

https://mailman.j3-fortran.org/pipermail/j3/2020-June/012131.html


> I see no technical argument there.

Surprising behavior IS a technical argument.  The issue is accessibility.  We all approach something new with a set of expectations based on previous experiences and extrapolation.  There's no essential requirement that Fortran do something in a similar way to other languages, or even be consistent with itself. It could do things willy nilly if it wanted.  But avoiding surprising behavior makes the language and its use more accessible and is something that ought to be sought after unless there is a compelling reason to do otherwise.  Which leads me to ...


What is the technical justification for this Steve:

> How does it make good sense for A to be finalized after P when its sibling component B is finalized before merely because one is allocatable and one is not?

-Neil
________________________________
From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of Steve Lionel via J3 <j3 at mailman.j3-fortran.org>
Sent: Monday, June 8, 2020 4:52 PM
To: j3 at mailman.j3-fortran.org
Cc: Steve Lionel
Subject: [EXTERNAL] Re: [J3] Clarification on F18/017

> On 6/8/2020 6:40 PM, Ondřej Čertík via J3 wrote:

To wit: what is wrong with the way F18/017 allows for different ordering
of finalization and why is it wrong?


Neil just answered it here:

https://mailman.j3-fortran.org/pipermail/j3/2020-June/012131.html


I see no technical argument there.

Stev

Provide an example program that
breaks if the ordering CBPA is used so that we can better understand
your arguments.


That has been provided here:

https://github.com/j3-fortran/fortran_proposals/issues/146#issuecomment-589857885

That particular program I think is not open source, so we cannot share it. Let me know if that description of the problem is not clear, and we can provide a minimal example.

A minimal example would be very helpful, to me at least. If that program needs to enforce a particular order, it should do its own deallocation of components rather than waiting for the later automatic deallocation. I view this as akin to list-directed I/O - when you leave details up to the implementation, you should not be surprised when it does things differently than you would have.

Even more helpful would be a suggestion of how the finalization rules should be changed to achieve the effect you desire. Please also note my earlier comments about interps needing to make the minimum possible change to address the problem.

Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20200608/1c540ac5/attachment.htm>


More information about the J3 mailing list