Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120424 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16405 invoked from network); 29 May 2023 09:18:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 May 2023 09:18:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D64601804D7 for ; Mon, 29 May 2023 02:18:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 29 May 2023 02:18:15 -0700 (PDT) Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-6af7d6f6f41so1190734a34.1 for ; Mon, 29 May 2023 02:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685351895; x=1687943895; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=raBnaF/YvWIefdj4QWdiXHq1vxJ59moKV9P32y3DVSM=; b=GkHmoW0qgtGkHp5tyGG8NpBVnfwtawkSdfH2CNq5A0whbAkoFl5pxJJsjLLDIgLHA1 Q/FUXt5S7ekCDGPpEknbfC4bdkPevEB0a1XUUolzFOS7RIZyH6+VgK0YWktprBByVpof 5cURK90S/TGe9WUNUdyY6DfjBkqK3J5HO03WkcUZx1qt7XKG+/AArlWYt5kxD4NK71Oh sQteHOC8aVwCsSDwx1AkHVnQFd80ku2B7K3/ok8048qLFpsx+XZOgPIYgQwSLQPsTO8S Iw+fOHk00qM3jITfEHpFVYXtXMuPA0DJN08vv8fZx1jUiAv/Rzi2jbZeSTACiVMo3dJV GnsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685351895; x=1687943895; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=raBnaF/YvWIefdj4QWdiXHq1vxJ59moKV9P32y3DVSM=; b=DYCqGkhb9o7WllMWZ288gK0YFLF557yluCHBpkpGJHNRpHNwsptaQa1Fda5aAfOWJ/ +ULhIr5333GgHAgOgeK5A2JGth+weJF836HaM+mRt5mTvvhsq+1FBmZt3POEmPGCHMj2 TC8vQAtYt/E+1r6HIeKo3daooMtcL3MabXYHiFAzQSIaLLJOvGRQ3iV9BvSGEmQzbgpQ ST/m9ZF0Cax35ZmMX1/omFaWqs7ud3QiGCrdaWJEfFpU2qvqqwKkrUtjQuHjbKjDU0yu lzS95II/fhmqy5Hkf/KS9elYOqaoWhavM+HyJXIs5sZlOOgtRqNB1Mbkj7yCToFDgE5O LbYQ== X-Gm-Message-State: AC+VfDwoyHuswnxVMHYJRAZLwqQTJTEe7RhCdTxGeCNxhLLSQ6KqiCH9 RAAM4s52ezP5RgvWb/dRySWW7Xcyoio2waTJlpU= X-Google-Smtp-Source: ACHHUZ68wt5DiGJro6Ii2dHll1kO0nTmhSYASF/Iyz4xZcDuAtvrov9wz0D2fOgQtYJ+QYrJyS/DWlIXwwJqXiPjtt0= X-Received: by 2002:a05:6870:36c1:b0:184:39e3:9c85 with SMTP id u1-20020a05687036c100b0018439e39c85mr4793721oak.29.1685351894634; Mon, 29 May 2023 02:18:14 -0700 (PDT) MIME-Version: 1.0 References: <799ae864-6e25-4196-a5ce-0d74600a8378@app.fastmail.com> In-Reply-To: Date: Mon, 29 May 2023 11:18:02 +0200 Message-ID: To: Nicolas Grekas Cc: =?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?= , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000000562805fcd19111" Subject: Re: [PHP-DEV] [RFC] [Discussion] Clone with From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --00000000000000562805fcd19111 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Everyone, In the meanwhile, I changed my proposal to use [] instead of {} after the "with" clause due to its better receptance. Additionally, I removed support for the shorthand "property assignment" syntax (clone $this with [property1: "foo"]) in favor the more powerful one where the left-hand side supports expressions (clone $this with ["property1" =3D> "foo"]) so that we have more time to decide whether the former one is really needed= . After talking with Nicolas and Alexandru off-list (I accidentally didn't click "Reply All" in my response), we identified that their "clone callback" proposal could also be a future-scope of the current RFC with the following syntax: clone $this with function (object $clone): void { $this->property1 =3D "foo"; } In my opinion, this syntax is OK, albeit it's a bit long to write and a bit difficult to decipher its meaning (maybe it's just me). That's the main reason I prefer my originally proposed syntax. Apart from this, I don't see a big issue with it, neither conceptually, nor with the implementation. Regards, M=C3=A1t=C3=A9 --00000000000000562805fcd19111--