[J3] [EXTERNAL] Re: 21-144r2

Clune, Thomas L. (GSFC-6101) thomas.l.clune at nasa.gov
Thu Jun 24 00:13:29 UTC 2021

HI Magne,

Yes - the situation is unfortunate.      Votes so far have not been too bad, but the search/sort/merge section was clearly causing confusion.     And we did not get to containers and "concepts".   Hopefully 1 hour will let us get the rest, but ... maybe not.

- Tom

On 6/23/21, 6:04 PM, "J3 on behalf of Magne Haveraaen via J3" <j3-bounces at mailman.j3-fortran.org on behalf of j3 at mailman.j3-fortran.org> wrote:

    Sorry I will miss the discussion of this paper, it will be too late for me - Magne

    > 22. jun. 2021 kl. 15:35 skrev Clune, Thomas L. (GSFC-6101) via J3 <j3 at mailman.j3-fortran.org>:
    > Van,
    > I’m certainly not opposed to a more targeted swap facility.    But any generics solution ought to be powerful enough to provide similar functionality, albeit with less elegance.
    > I’m not immediately seeing a problem with finalization.
    > A generic subroutine could handle the disambiguation through additional template parameters.   This would, of course, preclude using SWAP in multiple contexts within the same scope without judicious use of rename.  But better rename than implementing and maintaining multiple template variations.   The latter would not be intolerable for SWAP, where the declarations outweigh the implementation and the whole package is small in any event.   But for more complex algorithms the usual problems with duplicated code would be a real concern.
    > Cheers,
    > 	• Tom
    > From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of j3 <j3 at mailman.j3-fortran.org>
    > Reply-To: j3 <j3 at mailman.j3-fortran.org>
    > Date: Monday, June 21, 2021 at 8:53 PM
    > To: j3 <j3 at mailman.j3-fortran.org>
    > Cc: Van Snyder <van.snyder at sbcglobal.net>
    > Subject: [EXTERNAL] Re: [J3] 21-144r2
    > On Tue, 2021-06-22 at 00:34 +0000, Shterenlikht, Anton via J3 wrote:
    >> *quote*
    >> ALG-1: Should the generics facility enable developers to define a
    >>        scalar SWAP template that will apply to any type that supports
    >>        assigment?  (YES, NO, UNDECIDED, ABSTAIN)
    >> *end quote*
    > A swap statement has repeatedly been requested. Something like
    > x :=: y
    > for variables, and
    > x <=> y
    > for pointers.
    > Semantics can be debated. For example, if one is allocatable and the other not, how does that affect finalization? It's not obvious that this question even makes sense if SWAP is a generic subroutine because allocatability does not participate in generic resolution.

More information about the J3 mailing list