From m@ech|er @end|ng |rom @t@t@m@th@ethz@ch  Tue Nov 26 09:00:27 2019
From: m@ech|er @end|ng |rom @t@t@m@th@ethz@ch (Martin Maechler)
Date: Tue, 26 Nov 2019 09:00:27 +0100
Subject: [Rd] BUG?: A copy of base::`+` (primitive) is not a clone but a
 "pointer"
In-Reply-To: <e5560820-c958-877f-a5b5-0cd41d2e527c@gmail.com>
References: <e33fad79-22ac-cd00-ab47-7ad939544436@gmail.com>
 <e5560820-c958-877f-a5b5-0cd41d2e527c@gmail.com>
Message-ID: <24028.56219.587473.868323@stat.math.ethz.ch>

>>>>> Benjamin Tyner 
>>>>>     on Mon, 25 Nov 2019 22:34:33 -0500 writes:

    > For what it's worth, the current behavior seems to have begun starting 
    > with version 3.6.0. If I run in version 3.5.3:

    >> p1 <- .Primitive('+') ; p2 <- p1 ; attr(p1, "myattr") <- 1 ; p2

    > function (e1, e2)? .Primitive("+")

No.  What changed was just the *printing* !
(still in R 3.5.x) :

> p1 <- .Primitive('+') ; p2 <- p1 ; attr(p1, "myattr") <- pi ; attributes(p2)
$myattr
[1] 3.141593

>



[Rd] BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
Martin Maechler