Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95925 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82109 invoked from network); 12 Sep 2016 07:15:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2016 07:15:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=marijic.silvio@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=marijic.silvio@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.46 as permitted sender) X-PHP-List-Original-Sender: marijic.silvio@gmail.com X-Host-Fingerprint: 209.85.218.46 mail-oi0-f46.google.com Received: from [209.85.218.46] ([209.85.218.46:35730] helo=mail-oi0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/53-58405-F1656D75 for ; Mon, 12 Sep 2016 03:15:44 -0400 Received: by mail-oi0-f46.google.com with SMTP id d191so78331361oih.2 for ; Mon, 12 Sep 2016 00:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MFOAICgxnK1Li1Y+SGVyNSS/3bDxSggrYX1f4HO7vKQ=; b=0dA3wGKuZxwu3FNxQltt/jKjRr3yNeRPWLUP9kE57JQm3zI2bzGX4fZf0ktRl+rPzM FQgiiKAP5GTHLGP1HZNZ0NRUf7aiL9HFdfOWSg6NLmDM6s/lO1DsxxQvHjtlzrAbHdEW 0ZebFc3GUUhUp0OL+UBXM11vKzv/JOi39nTr0mF+LrSurpoMcdRYZRaz6sQcYN5UyHwZ z8xxsPKS5KwoOcflyQI3dtTbNomXxKHzT8MwawDjg9yx8jTmcFK5XeCvOEeB453V9Qsc LpjZaE+ZVonLb1ePu0RiK7AV/XyZpakmzchPUfM1H9R27y/Bqeil1exdJkBnT+YNKWcD t/AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MFOAICgxnK1Li1Y+SGVyNSS/3bDxSggrYX1f4HO7vKQ=; b=P1iARV8VBYN9/adnhLJmRYW826KNaxialGGsB7LWE7toAdcKRV9SXTS9g5eXcAqs3M 4nT660C+v/d0V5uWk8aKCgtqwyKU+QPlWipTw35o5x7DyyWz0K9gOv+1GqTJLGywOw/r w5R+yC1oXIUVJ4u6h1gQGSC1hr7OHCZCF7LHCjxVxxrXKkTAn8jLf7NtW/ZKPRCKm7pY 7xPnH4nknKd1D32iYfrxVKgN7sRVvz1Hy0YNrjwahjoNuuynwyiZp3avW0xcHnl6PQHX w+Iea2gXHwzwHxTqldHbVjVxrYVYpWtqVs3UgxI371awygy9n6kJZr7PmDx1/+pa7ndg R0Bg== X-Gm-Message-State: AE9vXwMEXOBIeCQ8V8jljS+m5tkCs8ddFNfF3Al6ZtvzNEf6gcP3hBbRwxE9KkjRsICETyzuebl4PeJ4doWb9g== X-Received: by 10.157.15.242 with SMTP id m47mr22479662otd.191.1473664540545; Mon, 12 Sep 2016 00:15:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.207.134 with HTTP; Mon, 12 Sep 2016 00:15:39 -0700 (PDT) In-Reply-To: <2c115733-8fe4-5230-a9ec-9d5f2cc2b810@garfieldtech.com> References: <642a6e78-90ea-cbf0-ec1c-376c24e568c5@fleshgrinder.com> <0800a5ca-3d14-c541-1a1a-2574ec802b8c@fleshgrinder.com> <83fa661e-2d3d-6548-a506-fb969be31c0e@garfieldtech.com> <56acc1d9-f424-a460-59be-3a9a1a74b198@fleshgrinder.com> <95832b08-ee80-18c1-a3da-202eed51903e@fleshgrinder.com> <2c115733-8fe4-5230-a9ec-9d5f2cc2b810@garfieldtech.com> Date: Mon, 12 Sep 2016 09:15:39 +0200 Message-ID: To: Larry Garfield Cc: PHP Internals List Content-Type: multipart/alternative; boundary=001a113d0f5a75193c053c4a4373 Subject: Re: [PHP-DEV] RFC - Immutable classes From: marijic.silvio@gmail.com (=?UTF-8?Q?Silvio_Mariji=C4=87?=) --001a113d0f5a75193c053c4a4373 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable @Larry RFC is not updated with the solution for cloning yet. So far I did add changes on which we have agreed on. Currently we have to candidates: First one is to have copy on write (As Christoph pointed out, we had that in PHP 4). Second proposal is to introduce "transformer" keyword as a method modifier. In "transformer" method $this would basically represent cloned instance instead of the original object. Cheers. 2016-09-11 22:04 GMT+02:00 Larry Garfield : > On 09/10/2016 05:55 AM, Fleshgrinder wrote: > >> So? Where are we now? CoW is definitely doable and I personally think >> that it's the best approach because the engine has full control that >> nothing goes south. I also do not think that it's magic in any way since >> developers have to add the _immutable_ keyword explicitly to the class. >> That this modifier modifies the behavior should be obvious, _abstract_ >> and _interface_ also do that. >> >> Since I mention _interface_. I've been thinking about it and I would >> prefer it if the _immutable_ modifier also works for interfaces. >> Interfaces are pure abstract classes after all and they are meant to >> define a contract for implementors. I cannot see any good reason why it >> should not be allowed to force implementors of an interface to be >> immutable; same as with abstract classes. >> >> Another aspect that we should discuss is how immutable properties should >> behave in case we decide for CoW. >> >> @Larry what do you think about the CoW proposal? >> > > I'm afraid I got lost in the thread somewhere with the back and forth > about implementation details. Can you repost the current proposal, or has > the RFC page been updated with the latest CoW-based recommendation? > > > --Larry Garfield > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Silvio Mariji=C4=87 Software Engineer 2e Systems --001a113d0f5a75193c053c4a4373--