[J3] Paper 22-120r4 available
Brad Richardson
everythingfunctional at protonmail.com
Tue Mar 8 22:55:48 UTC 2022
Van,
We have been advised by a compiler developer in subgroup that this should be workable. I will admit that we haven't thought real hard about module variables defined in a template.
In any case, there are use cases that seem to require this. This example for instance: https://github.com/j3-fortran/generics/tree/main/examples
If you can explain how that example would be workable without requirement F, I would be willing to entertain removing it.
Regards,
Brad
Sent from ProtonMail mobile
-------- Original Message --------
On Mar 8, 2022, 11:51 AM, Van Snyder via J3 wrote:
> On Tue, 2022-03-08 at 13:37 +0000, Clune, Thomas L. (GSFC-6101) via J3 wrote:
>
>> I have modified the paper to split the initial straw vote into 3 separate straw votes. Allowing nuanced differences in the treatment of type-bound procedures, data components, and kind/length parameters.
>
> There are serious problems with part F.
>
> Not the least of the problems is the difficulty for processors. Even instantiations with identical actual template parameters within the same scoping unit imposes an unnecessary burden. Program author(s) can manage duplication by instantiating in modules.
>
> If instantiations with identical actual template parameters in different scoping are the same entity, SAVE variables, either template variables or within template procedures, are problematic.
>
> Suppose a template is instantiated with identical actual template parameters in subroutine A in module M and in subroutine B in module N.
>
> Suppose the template produces a variable X that has the SAVE attribute.
>
> Is that variable X in subroutine A in module M the same as variable X in subroutine B in module N, as if by storage association?
>
> This would be undesirable. It's an interp tar baby that will cause storage-associated migraine headaches.
>
> Don't do part F.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20220308/69efd792/attachment.htm>
More information about the J3
mailing list