[J3] [EXTERNAL] [BULK] Re: Question on dummy CLASS(*) pointer arguments

Vipul Parekh parekhvs at gmail.com
Fri Dec 8 17:35:17 UTC 2023


On Fri, Dec 8, 2023 at 11:09 AM Clune, Thomas L. (GSFC-6101) <
thomas.l.clune at nasa.gov> wrote:

> .. My common case is when the passed object dummy requires the actual to
> have the target attribute.    This is all over the place in my containers
> as those generally return pointers to items in the container.    But
> allowing POINTER on the passed object is probably a nonstarter, even for
> INTENT(IN).    Have spent probably about 10 hours tracing bugs of this sort
> this week. ..
>

Thank you very much for your reply, Tom, much appreciated.

"10 hours" this week alone is a lot of time, it's valuable developer time,
it's a precious and scarce resource and thus any continued impact along
such lines will bubble up, sooner or later, to the attention of decision
makers in any good organization or enterprise.  And please note this number
really adds up: this number at one team at NASA really needs to be
compounded with uncountable but countless time in many teams elsewhere that
still are making investments in Fortran.  The teams I have worked with in
industry have run into the same and thus US27 worklist item toward Fortran
202X had immediately caught my attention as something which can be expanded
to more than one use case such as what Tom has raised here.  Alas that
didn't happen with Fortran 2023, a missed opportunity.

Programming toward containers is indeed very important for multiphysics
problems and yes, the current situation with Fortran - e.g., what is
mentioned by Tom re: passed object dummy argument and target/pointer
attribute is one aspect of this - does lead to difficulties and
inefficiencies with programming containers in Fortran.  It leaves
an unpleasant experience with many programmers.

On Fri, Dec 8, 2023 at 11:39 AM Clune, Thomas L. (GSFC-6101) via J3 <
j3 at mailman.j3-fortran.org> wrote:

> I suppose a solution which might not require too much work forthe standard
> is to introduce a variant attribute TARGET++ for dummy arguments.
>

A new attribute, similar to the concept here by Tom though not the same,
was indeed suggested at the /DATA subgroup discussions circa 2019/20 (e.g.,
meetings US220 and US221) toward the US27 worklist item.  Unfortunately it
received a summary dismissal, I still can't fathom as to why.  I am left
wondering repeatedly: For whom Fortran, for what?

Vipul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20231208/0acbfff6/attachment.htm>


More information about the J3 mailing list