Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122514 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 A845E1AD8F6 for ; Tue, 27 Feb 2024 16:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1709050664; bh=k0dVLi9lodWa+g+DmWZeDIhdWNAHe6kmugnXHdamRCg=; h=In-Reply-To:References:Date:From:To:Subject:From; b=ivMTMZvY4BXxoObT72asbp3+dRx4LMQC48GaeJksENx7CTSF86dFQxtV96n8XvkfW 13LCM22hkDYEVSKBVCpvgRIgjC6SSfPGFyWXfNF8sq7J4OOb6fdHZy7Yrhj2i5qhaW nA8jF0+xXZ3iScWnB2HmnQfbokANF9jqX34TRPHjpdiZ/O6vKNCK++ZhNyK5hWIV14 rhEsQ3LOd5x4G3jqnW94E2OjV8Blyy5nvM1ELHT8vbE2ASu8DxOwj21iLss9/WeDp/ N6ReyoMmZWISDjAxU/wuxql3i11OfKpJlyg7hT8Y3lqbZgZQstl5TiALWhJy8rXXp2 rZu7tvYoWcQ+w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4017D18006C for ; Tue, 27 Feb 2024 16:17:43 +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,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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 ; Tue, 27 Feb 2024 08:17:42 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 9B75D3200B39 for ; Tue, 27 Feb 2024 11:17:32 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Tue, 27 Feb 2024 11:17:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; 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=1709050652; x= 1709137052; bh=ijPL3EUWha2O5oLhLeVc5Pyp/5OaeV1ly1hxCeCZWE0=; b=B zUcWKT95k4DEhvb2idzl1J1vNhC5luGSJGFyT9uKRBvyAd78SxetTrg09bBQPT47 konToSKCSJ/zpTAbj/UlJAOys1ht9px1Hb9JOD4P5dWBpT7em10yB3tB9ssdg4jR d+TuCURzGFHEaCqkiCXS8yyAynyr5lv4+/vuuOY0coNu8EKjs+YyXmj2acJCA5Pk XyDsYzB0pIeVgYqpvnHn0dMVsSRwL37YmbknqZerlspF2qgeVr9R8KaSymaHSBlM 1SWXZdwxr7wj4zg2wXT5XBRwc9z9mAqPizHstTL/Xrrl+T0qOTqA69/MM2inXDjx XgO8Xbr70fx5XsYJrXdwQ== 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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1709050652; x=1709137052; bh=ijPL3EUWha2O5oLhLeVc5Pyp/5Oa eV1ly1hxCeCZWE0=; b=Ky66Li9W/yElXYiCLveppDoESORvOI3sQCri5ap2XdQ7 hHQi07Wm83gcqGwrkkqfBQpS3ip4yudxdSvxkWTgI8n4/xw685302rvAEjbyOZ5k jnvsXi97DxlrGQ/Mv8aozth5drN37Huy4WD0l9pUwDiOwNQmDIZV6ggnV8BxDsTC neDk2/CvDmwVm58lnBPljBdBKdMXgTEvmiE1sIn4y6rCZnnNpUqNNdts06Osrfyh +d2ZRn8qUQg695Y8cZoBE4UX53I0HcZtFi3ac98BIoFe4pe8seftgSVa4nPVlkiY r04H/+5VkPUvjyjfRuJA59hfIyAPoYdKZ7n9bP9bQQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgeehgdeivdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepgeelgfekudeivddvteffueejffdthfejieevhefgffek udevkedtvdelvddvffefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id ACC2D1700093; Tue, 27 Feb 2024 11:17:31 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-153-g7e3bb84806-fm-20240215.007-g7e3bb848 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: In-Reply-To: References: <790b5b4e-f51b-4050-a12a-5fa903d0568f@app.fastmail.com> <52C6F501-8E23-42D7-8541-88A22AD79375@koalephant.com> <36e90d8d-d275-4ce9-9dd9-1e2422c6d3a9@app.fastmail.com> <2fdf1933-b51c-40cc-8d02-31899b96c71c@genkgo.nl> <95e93cb9-3ab0-4cf3-8ec5-83e74c9dd607@genkgo.nl> <876aff9f-3eae-4d2d-8e3f-30dfbbeed49c@rwec.co.uk> <963f5cc5-cdb1-4384-b519-5cb15640654e@genkgo.nl> <58B82A81-8A89-4F17-B982-7FC36404032E@rwec.co.uk> Date: Tue, 27 Feb 2024 16:16:39 +0000 To: "php internals" Subject: Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2 Content-Type: text/plain From: larry@garfieldtech.com ("Larry Garfield") On Tue, Feb 27, 2024, at 10:01 AM, Frederik Bosch wrote: > Hi Rowan, > > Our discussion sums up the pros and cons. Whether yield is > complicated/confusing or not, is maybe personal. The same applies to > getting $this->prop resulting in different calls. Larry has removed > $field from the RFC completely now, while I think it was a sensible > approach to read the current backing value. I think I have laid out > another alternative to writing with the yield/return suggestion. It's up > to the authors of the RFC to do something with it, or not. Thanks for > taking the suggestion seriously. > > Regards, > Frederik Ilija and I have discussed this, and we both agree that yield is not a viable option. There is no generator or generator-like behavior involved in hooks at all, and a syntax that implies there is would be very misleading. And adjusting the code to make it actually generator-based would make the code considerably more complex, and most likely slower. It figures that people would start speaking up in favor of $field right *after* I removed it from the RFC text. :-P At the moment, we're comfortable either direction. (It hasn't been removed from the code yet.) The main question is whether the trade-off of an implicit variable name and the potential for confusion is outweighed by the clarity about what is happening and where. It sounds like most people are just really, really pissed off by an implicit variable, but that's based on the as-usual highly unscientific survey of "who replies to an email." I will probably start a poll shortly to help get a better sense of what the actual voting population thinks. --Larry Garfield