Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122524 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 479291ADAA6 for ; Tue, 27 Feb 2024 20:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1709067007; bh=pIuua1Q/srHmW2718xr5yT9Le/ZHvvQkhytetlTCflQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=EZxO1kXY9eN/kezLbg10OhfBSnEehH+GUA3Ckeut/e73sL5vpELZ8KhzQHFi6P7wb CVA5EwP9JXPfjMOVJA64ebyxFVANnE3HLwwv6T0uttGMNMdb+0Tpu5vN7ClPD2j8nf DoVe2YakErX1+TRnyHI7jeZdEsNyzewJ3l2X3alMYlSKTd9GYO+72eKKHAXA6gsiKG FhgBp0kL69zmBaz/jWt1MDUxNBMdh4I1Z4UayhGg6ZCsRhgQlAyzOVobj8A+2UUEmz tSx9CBboCG/c0sHZHQ7iS6kD4qXbd+jZzbtcWRZQvpGDHSES9XqG6qLQCUviyg77jI d5Iz0dVyyTUdw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 17797181C58 for ; Tue, 27 Feb 2024 20:50:06 +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_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from wfout6-smtp.messagingengine.com (wfout6-smtp.messagingengine.com [64.147.123.149]) (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 20:50:05 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id 939951C0009B for ; Tue, 27 Feb 2024 15:49:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 27 Feb 2024 15:49:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding: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=1709066995; x=1709153395; bh=qHCZc7toJnWnM4uU7i6S4s4ETKLoqdgw+K4qIeDeYC8=; b= a/jOqHizRVGf+WLo8zTvbg+5uBJmjtUIcEEVmfe58y9ahBQ3rHnAeObb+bkaQsk/ 3uSBjai8DRqWMM4jdBdNcHe4qmbxTUZUo2in5f0Z9hYP60i+ofmUMOWf6gh32G4L GkZYpbCMOpt/SnpS3TsHfb6Htcr3mPNEkBCrRviVjRr9ssEe3ITspcRwxSo6X77a TAC3AjWJyHSK2FPgAOIMwQ/6XeJ8V8s5fPqSY4ZhCHgET9fVnwSTu3c5zshGsO14 nm5zclvQkA9tXIC845oW66YB7taxXdGcZWL/N1unJ7MwXRP/5vZ/CGy/uDWLh4U2 2lTZL9Ft1FjVrdJ1OMd/Ig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=1709066995; x= 1709153395; bh=qHCZc7toJnWnM4uU7i6S4s4ETKLoqdgw+K4qIeDeYC8=; b=K C53wSfkaBVvFGXoqplGOjAs9W4CkCgBlYknPkhFb9X/1s8tlfyFn7c824bMKikXl d6IrUxd8KmEeN7xlDh4H/UBgpGr2nixAE03eD7g+IP/QM6lLCCZJQV3Lyt3W91iR D/L/A0nzoOEPJAFDLq3FLcdkNuv1DtVByvhjEnZlpHSCl2K7uTadMo07meCZ7BWv v54ectL8INUgQ262Fqf0nXR4kt/b4wza4WrpmNN2hLNiXQEPur50nOB2921UGRj7 cPpCA0u3qXCf4Qb70c/qHV4frrTigEbdjw/utBJ22JULqg9S4ivWmYRJaF3+3mkB 4yOqV/etjkrHi//WGv+Eg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgeehgdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtvdejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhnshculgfkoffuohfrngdf uceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenucggtffrrghtthgvrhhnpe fhleelteekveffgeeileetgffgvdelfeevuefgvdekkefhvdetfedufeeiheehfeenucff ohhmrghinhepphhhphdrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukh X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 27 Feb 2024 15:49:54 -0500 (EST) Message-ID: Date: Tue, 27 Feb 2024 20:49:51 +0000 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2 Content-Language: en-GB To: internals@lists.php.net 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 27/02/2024 17:49, Erick de Azevedo Lima wrote: > > It sounds like most people are just really, really pissed off by an > implicit variable > > I think that it could be good to follow the PHP way to mark the > "magic" stuff, which is putting leading underscores on the magic stuff. I think that might help; I also think that even if the RFC offers a choice to the list, the final implementation should not offer choice to users. I think part of what put people off with the original wording was that it implied $field was an alias for $this->propertyName, but the alias was "preferred". The reality is that we have a new thing that we need a name/syntax for, and $field or $this->propertyName are possible options. To avoid another lengthy e-mail, I've put together some alternative RFC wording. The main idea is to switch the framing from "hooks on top of properties, which may be virtual" to "hooked properties which are virtual by default, but may access a special backing field". As noted in the introduction this is *not* intended as a counter-proposal or critique, just somewhere to collate my thoughts and suggestions: https://wiki.php.net/rfc/property-hooks/imsop-suggestion Regards, -- Rowan Tommins [IMSoP]