Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120267 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19430 invoked from network); 14 May 2023 02:53:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 May 2023 02:53:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5C03518004D for ; Sat, 13 May 2023 19:53:14 -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=0.6 required=5.0 tests=BAYES_50,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-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 ; Sat, 13 May 2023 19:53:10 -0700 (PDT) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-96622bca286so1756148066b.1 for ; Sat, 13 May 2023 19:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684032789; x=1686624789; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Kk3kEnPSXEok0LBh6brHpvs0t5gBpmpyj7heodeE/lI=; b=gmXG47iHf4ChI4Mj02aU/SAy8sW5j+VtrPg6PErtt0b7ImmNrc7l+h1bMbXwW2uXct 1L1tkbkrWloV3gpBThJtFGQifVMJLCFIqPX7JqLlVfK/LUUIojas3FCyuRclB6fJz3ua YnyH2WYi4PyEHn2OpgVzx/roUOweqncWPM7+9NXx23wx4XjPo8I4Grt3/8MnXUulyzqj 8jYxRxb4Dvsz71jFDWQr2hPAQSEJHzDNVGB2M1bnlt0y9TQJjxgMpBEmZwJIaCAkvvz1 YbCzkUs/gpX/LVlREchLPGZ7txGzLP7+8hadux3Zi1+DD/AouheDcPNzO2WfSVDfHh55 clSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684032789; x=1686624789; 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=Kk3kEnPSXEok0LBh6brHpvs0t5gBpmpyj7heodeE/lI=; b=Slq66xU2izJ8Zp/2OWPU5fTu1tpbodPgPnkohqn0WqFVIE+czNkslTerQ5TfvCJaHt W0aVLaxjuiu3ldbFwIrGfvosYT4GFrb5QzRtDXdYjnOUns1lB11s9cFri3XUea/S9e9S 0qC917vqQQ5UdQb1HsaFMbcyuhGhZ+OjWFRtQlLPcikDzYWywOtIhNuXFJVkB5PeVVwN jl4CfmXpJ26eCsVWpVNbLLWi7JBwagopXV7YgiuxHgsnWKQ0ti9jw+axDQMeawly430g kZZMv5o9DlStB71pY61B4tRyhpEIGT7IISviZSmuJuOBU0VA+3xdMpdbYgSylyFqOexs ckAA== X-Gm-Message-State: AC+VfDwuLHJJgUufgwdxwDayEvbT5Xi1/x7w95EAbPyVBrc4ngGdtTd5 WLYu7OLgsnzav8NU2n5wtc8p3yEsqqDLVa0Lplc= X-Google-Smtp-Source: ACHHUZ5Rd6Lsj0T00rIXSPd5emtq34Kd07sg8TxwjeEw1/FdOK4xtFzXKsBp6swx9FO4xzuvsI0PscAXRrkGmCykAYM= X-Received: by 2002:a17:907:36c8:b0:95e:d74b:d171 with SMTP id bj8-20020a17090736c800b0095ed74bd171mr23194359ejc.28.1684032789329; Sat, 13 May 2023 19:53:09 -0700 (PDT) MIME-Version: 1.0 References: <641b1ca0-d33f-4f38-ae64-81b4abce24da@app.fastmail.com> <57aed5a4-f5e5-4a47-bf7a-69249f1d0ef1@app.fastmail.com> In-Reply-To: <57aed5a4-f5e5-4a47-bf7a-69249f1d0ef1@app.fastmail.com> Date: Sat, 13 May 2023 22:52:57 -0400 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="00000000000032bf6e05fb9e7083" Subject: Re: [PHP-DEV] [RFC] Property hooks, nee accessors From: matthewmatthew@gmail.com (Matthew Brown) --00000000000032bf6e05fb9e7083 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > Regarding $field vs. $this->propName, there's a few reasons we went that > route. Overall I think this is a really good proposal, but you might want to consider a second vote for that particular syntax. `$field` vs `$this->propName` feels a little magical. It's a simpler magic than actual magic methods =E2=80=94 it's magic that static analysis tools c= an quickly reason about (as they can with promoted properties). But I can imagine developers coming across this particular syntax in a PR and thinking "that looks like a bug". I know it's a few extra keypresses, but I think $this->propName is easier to scan, and more familiar (given this RFC introduces a lot of other new syntax). --00000000000032bf6e05fb9e7083--