Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122533 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 059561AD8F6 for ; Wed, 28 Feb 2024 15:17:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1709133436; bh=8aqQeAX61uRGuO/26evTjMkjwvrxsTntazfROepr5zs=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=Q2SnSZycHkXlW5pADt3fwa3omyNp1rajqni63yfr4wW1bCS+9DfZr4BUfZrLybzpT Hmy+k5W4YA1VG7vUrCREHeExj7zL3zvuVd4K+hLd8NdezX+59hT4TIzEgM0Lm7uZDN JvrRHplpN2BIM14JuSE7jn2GyKjiu5cpgCtCQLl0lJvUlgnEspu6WsI9fzqF5xYZdn KoGKk8+c0lX/G3ujiUHYB6RT3hCbhH4AYeaZa101Bqu5yzsA8i+QO68g8w6yXFvYKD XbOSG/l1b8gQyasYg9a0FHFm+bo6Z2N45wCAFxwxTVFp2yqvXyfktUO2Kptivgi4nh ZUxjcdqe2TPJQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BC1B9184747 for ; Wed, 28 Feb 2024 15:17:14 +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.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) (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 ; Wed, 28 Feb 2024 15:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail; t=1709133422; x=1709392622; bh=8aqQeAX61uRGuO/26evTjMkjwvrxsTntazfROepr5zs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=MbtZxMxgN7IM/Dk6b1V4BEcHH6f9e3oojuw/OnZXBgx17UQfXO3OjFjZJ/beJU1os lKIBQOgd+vH0iV0glh7Ou9RM0Fl1IDWNTw1Oqcvr6//s6uyhnDU4nVW+LdMNwucwxk a3qwu09N/D3i/YXuowKe7JZcRRVVJcZlt7NwJD1tVZaaDkLWLk/kq1OqSKxKaH/PAK pwccljz41EWoQ/x41CbLr7XqfOIA3MJ6gUEMw4L2MBPcxh46IolVqFDVrogV2esaGt I5MI0GTLJKuA4oVdkL/fcMUAb5rc1Tpo7PNu/lHQyAKixC7Zyzw54JdcrM934lKghs frMfbtxh5Abww== Date: Wed, 28 Feb 2024 15:16:37 +0000 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2 Message-ID: <762ZQ1NKmcAWJKEf9Dk4AIYAXaU-H3PsMYFSY4Y0yvpufMPdS3bd3MANCzhLKREerQl_N8z0mrkQ_k4w08JhAVFTrQ3xd71BllmvRkeSq84=@gpb.moe> In-Reply-To: <2299271f-50ea-48c1-81fb-b64fa10c9bbb@app.fastmail.com> References: <59619244-917d-4936-8f21-2854840a9bf8@rwec.co.uk> <2299271f-50ea-48c1-81fb-b64fa10c9bbb@app.fastmail.com> Feedback-ID: 96993444:user:proton Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Tuesday, 27 February 2024 at 23:17, Larry Garfield wrote: > I genuinely don't understand the pushback on $value. It's something you l= earn once and never have to think about again. It's consistent. >=20 > Ilija jokingly suggested making it always $value, unconditionally, and al= lowing only the type to be specified if widening: >=20 > public int $foo { set(int|float) =3D> floor($value); } >=20 >=20 > Though I suspect that won't go over well, either. :-) Same, I don't understand the pushback on $value, for me this seems clearer = and less confusing than the existing $this variable when I was first learni= ng about OOP. And I would be in favour of just making it always $value, if people feel th= at strongly about being able to name it with a custom name they could propo= se this as a follow-up RFC. One thing the RFC should note, which I would expect to be the same as the a= rray cast, is how do backed/virtual properties interact with get_mangled_ob= ject_vars() Best regards, Gina P. Banyard