Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120050 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43431 invoked from network); 17 Apr 2023 08:05:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Apr 2023 08:05:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 32A1E1804D7 for ; Mon, 17 Apr 2023 01:05:45 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (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, 17 Apr 2023 01:05:44 -0700 (PDT) Received: by mail-yb1-f176.google.com with SMTP id v9so4312627ybm.0 for ; Mon, 17 Apr 2023 01:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681718744; x=1684310744; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KgqSYQwzP1de/Gw563NDQrYpeJIMwqGLWz1Z0/N5j2Q=; b=eGCGWpu/nYIogBkLk9tY+MRxjTTLcmjqtLdQkqVvLO1LRp+v715U+p7RUpsJhUaPf8 qVx1R73Jb772wMbZAqr0m6ObwdMW0K7yZhE0AhO7lnU/3sd+i5TiSGCxb8QAG24lWKfn xDNZVHwct7t6FFa+RV2NgTTECEJZwV11+L2L9C4MdQRC8a8WQ4Pq0KGfHa7h7uHBrMYT 7nmSSk7TDChzYXP6R1A70dXTJfnPKVayZhLa+YLXm+tJSvKd2SfWDmoGGzCv5VWXq1SI z0r+jjSPuBMGFVagkQlvbyWzcF75pEqW5vVCuEIiLD8bGJTA2JroUIrdHcqJ1eUmdkt1 tDSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681718744; x=1684310744; 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=KgqSYQwzP1de/Gw563NDQrYpeJIMwqGLWz1Z0/N5j2Q=; b=S8gMxNcTfvEPkJPb0Dssc91+VatQPTreqJdWarlDQkfRXmZdcJTR2fkJSmX9t/+IiU fIcnmQe5zXnpbu9KhKHus6Q88tbL/b3KDvCEo/swsIewsx+pun40odc+GmbOJly9E3vu DoR/D1dcsfAO8508E4pqhLp9K2UXevqZhrtrHYpiomimtRbuc7SY1IU8nR0Q1ce8mEG0 b34Q5PrVuK5ZhweJt0jGS/mY1CIdWbyHzgbXvLWortrfcRnwvf2D4vQWHfVtVUvA0lRl i4MG0HI3TJRdK5S3isnCnDq9PsNMDTkI7/w4mVzRBd6K0qj5BQqPo+WIuKMo7oA8KXUE cqbw== X-Gm-Message-State: AAQBX9fcvSWhd8m++LV1dSJhBAcaaoDXYtgx75/wNhflfLhxpGsz8Qfe wqM0dUa4wjhT8+mqTcQibxLAI1uYtj5cEg+ti54= X-Google-Smtp-Source: AKy350ZOp+PBOPPza6QKZQ1gUcgi5/D+kGiP5L9basf+7f6zgzmpQe8qb6sM57QHAemmUYD8DXXXNI6rvF7a/Fz9Ngc= X-Received: by 2002:a25:d24e:0:b0:b8b:eea7:525b with SMTP id j75-20020a25d24e000000b00b8beea7525bmr8807555ybg.7.1681718743831; Mon, 17 Apr 2023 01:05:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 17 Apr 2023 10:05:32 +0200 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000005698a005f983a875" Subject: Re: [PHP-DEV] [RFC] [Discussion] Clone with From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --0000000000005698a005f983a875 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi M=C3=A1t=C3=A9, pon., 17 kwi 2023 o 08:32 M=C3=A1t=C3=A9 Kocsis na= pisa=C5=82(a): > Hi Everyone, > > Quite some time after mentioning the "clone with" construct the first tim= e > (at the end of the > https://wiki.php.net/rfc/write_once_properties#run-time_behaviour > section), > finally I managed to create a working implementation for this feature whi= ch > would make it possible to properly modify readonly properties > while simplifying how we write "wither" methods: > https://wiki.php.net/rfc/clone_with Thanks for your efforts and for bringing that up. I am curious if possible to implement the feature without using `with` keyword it visually could look pretty close to something like an object initializer in the future: return clone $this {c: 1}; return new Bar {c: 1}; Cheers, Micha=C5=82 Marcin Brzuchalski --0000000000005698a005f983a875--