[J3] 21-144r2

Van Snyder van.snyder at sbcglobal.net
Tue Jun 22 00:52:49 UTC 2021

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.

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

More information about the J3 mailing list