Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126032 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 075241A00BD for ; Sat, 23 Nov 2024 15:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1732375537; bh=xaVaJhEJBzu06vE9g2A7pZu/YtWNKfqaNmu5nUluCSs=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Ez3BcZhsV7eAXDCOpAUwVAIqyZkUlfpnA51nS0M5XUYlVlM1r2tJp65Av+ZPtVH/B /2h9/U3Zr6rexgvrFF0s+Rsj7tcKitJDlGa6LX6iJyq1UD+oPoR8dgL2ikQ0YRvTWQ c+Brt+pAjCozwXx7NHotUZDAsp/e5/As3e1qmNyIYS9Pg4x05cty3HOYtECX2PTOKK cGq0LUwV6n5voFDNaWzvVx7S+vC3l2fe7LbaI66/u9Mr0p0FCWz9vU4RSqcx1emBPo chF4jxeXJpHZzm8dRA7tKVoKOi32MxsnLNJ72ZDKQJXufPqj6OSu0LoOqcm95Rx77Y 2O0LCfSupBKNw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 064F918004D for ; Sat, 23 Nov 2024 15:25:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com [103.168.172.148]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 23 Nov 2024 15:25:36 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 969C71380092 for ; Sat, 23 Nov 2024 10:22:54 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Sat, 23 Nov 2024 10:22:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1732375374; x=1732461774; bh=CUlc/1CyOV tOj/w+Kj57alsackA/LfNiF/n9e6zWjG0=; b=eSiqjZSgk/hA10oxUqw/5LbZaC eztMJIwxfAQ8qgFbomvcChZ1By5e8ybpQTJJKJ3q+yvhTS0olw9+jDO+u8AAUbOX IU5Wn52yNB78mSoK0YeKcbyBxQFsIFbvxSBnTdrDxXpU5lV3u9x7B/Gthr0NfRUb mM69fk4XCEGxvfAJtQPfELpvwZDj2oSGa+aJnwDm7vLfDvt8j9FTv7w4csQrg1q+ kjCsWbbfm1JUDfkl1MLxo/QCfqlBZnb6dZV59mDWBOcv2JGUz8HZ4C5TPbEtxsAe ZJmnWNv9LpJCl4G8fRf4nr2lh+7upke5edPF97ZBf6A+yP0qftUJNhrAhdQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1732375374; x=1732461774; bh=CUlc/1CyOVtOj/w+Kj57alsackA/LfNiF/n 9e6zWjG0=; b=tDO+Uj4WyEJXz3Je67jk3CSZgf7EPCEQQ9AgcS+IUTsLRhKUgmJ 3ayXpIt04lE4bTglC7F50rFukzhz2jY7scQfTHFMnQfhp4Nn+tD+QxXoHohJDHS1 362u0zFbH2DCgqqtzjfWb95KYXuXN6hN6y9eHnzmhegG5/JhMng81MJevAtE7IgH TFDxkyY+pCBudLLjejE7RZWgup+sfhcwTcWtsarTIQp3kNqqL5VzpXUM/GORg++V m/6/APM+4sYPjS+IWF/AyA2zxZwDGIRJI+ee0Uxz1SBsbCzzc1wpiKkEmMQjZH0A Mz601InQXbliC+e2oQnm0vpzMt9Eq8yAe9Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgedugdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfg fuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhnshcu lgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenucggtf frrghtthgvrhhnpeeltdduuefhffeuffdvkeejudfhffffgefhheefieffiedvgfevveeg iefhgfduudenucffohhmrghinhepphhhphdrnhgvthdpvgigthgvrhhnrghlshdrihhopd hgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghrtghpth htohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlshes lhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 23 Nov 2024 10:22:53 -0500 (EST) Content-Type: multipart/alternative; boundary="------------TQBCxpMAzJxsJwmOtkOfRlho" Message-ID: <163a08c1-2279-4a3f-a1bb-8cdfe406a4ba@rwec.co.uk> Date: Sat, 23 Nov 2024 15:22:51 +0000 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Data Classes To: internals@lists.php.net References: <18b85ba5-5f1c-489c-9096-3ae203977fbe@app.fastmail.com> Content-Language: en-GB In-Reply-To: <18b85ba5-5f1c-489c-9096-3ae203977fbe@app.fastmail.com> From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") This is a multi-part message in MIME format. --------------TQBCxpMAzJxsJwmOtkOfRlho Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 23/11/2024 13:11, Rob Landers wrote: > Born from the Records RFC (https://wiki.php.net/rfc/records) > discussion, I would like to introduce to you a competing RFC: Data > Classes (https://wiki.php.net/rfc/dataclass). Thank you for continuing to think about this, and PoC code is always useful to work through the implications. It seems like this is going in a very similar direction to the work Ilija shared in April: https://externals.io/message/122845 and https://github.com/php/php-src/pull/13800 My knowledge of the engine isn't good enough to compare the two PRs, but the descriptions seem very similar. The main differences seem to be details mentioned in one draft and not the other: - You have described details for constructors and inheritance, which Ilija left as open questions - Ilija had considered how instance methods should behave, proposing a "mutating" keyword and "!" call-site marker. Your RFC doesn't discuss this - the changeName example shows behaviour *inside* the method, but not behaviour when *calling* it Is it just an oversight that you didn't link to the previous discussion, or had you not realised how similar the proposals would end up? Either way, this looks like ripe ground for collaboration, unless there is some fundamental disagreement about the approach. -- Rowan Tommins [IMSoP] --------------TQBCxpMAzJxsJwmOtkOfRlho Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 23/11/2024 13:11, Rob Landers wrote:
Born from the Records RFC (https://wiki.php.net/rfc/records) discussion, I would like to introduce to you a competing RFC: Data Classes (https://wiki.php.net/rfc/dataclass).


Thank you for continuing to think about this, and PoC code is always useful to work through the implications.

It seems like this is going in a very similar direction to the work Ilija shared in April: https://externals.io/message/122845 and https://github.com/php/php-src/pull/13800

My knowledge of the engine isn't good enough to compare the two PRs, but the descriptions seem very similar. The main differences seem to be details mentioned in one draft and not the other:

- You have described details for constructors and inheritance, which Ilija left as open questions
- Ilija had considered how instance methods should behave, proposing a "mutating" keyword and "!" call-site marker. Your RFC doesn't discuss this - the changeName example shows behaviour *inside* the method, but not behaviour when *calling* it

Is it just an oversight that you didn't link to the previous discussion, or had you not realised how similar the proposals would end up? Either way, this looks like ripe ground for collaboration, unless there is some fundamental disagreement about the approach.


-- 
Rowan Tommins
[IMSoP]
--------------TQBCxpMAzJxsJwmOtkOfRlho--