Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120219 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 48680 invoked from network); 9 May 2023 12:39:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 May 2023 12:39:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2D06F1804D7 for ; Tue, 9 May 2023 05:39:09 -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.5 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE,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-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (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 ; Tue, 9 May 2023 05:39:08 -0700 (PDT) Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-55cc8aadc97so87336107b3.3 for ; Tue, 09 May 2023 05:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20221208.gappssmtp.com; s=20221208; t=1683635947; x=1686227947; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ab7HO0RXyzFhUauJKZZZXJ25E4qFlGgN3KRlMxkuPnk=; b=r3arsY6Ne8oYmcQ6xbtHjWC/1duEim1nLj4vH5rDzbZlv/UTgQDdZXAhcaVq5q44So skHJ90gywv48ReMIlmA3amXgPlu2B6CLIIvGclMtPBFmkp+sSN9sxiXu4u8LNhWP7XrJ wzIz0vgKDhQJHWFtw+ALa42OYp51S+aSE5cy6nZLqSBeCoFugHcFya1I2qcsZJyNAMhV Oe5y1afFjxdIDxJ2F+b8pO5VXzgwyLqXsLOFjMAd/5W4kU7BLAgidE3O9ZHGCTKPmUA2 tyGXJP1Rj7HBJp4tVfS9U7wz59L1WKiYgDK5YqnISa3iza8MoaXJoUij3zDzQF7k6CDG 1NYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683635947; x=1686227947; 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=Ab7HO0RXyzFhUauJKZZZXJ25E4qFlGgN3KRlMxkuPnk=; b=OyQdgoPk67t74Cxr3lHedaQlcpk2p2CXDHHC89/jshQCZ4kfkfGElXS1uh1miTVE7j eFJGnphYDuoqr5do10EdBspCpyZfOdiDHa+vc2m0Q/gft2UhYyw8InpTCxM8i79xz28G syes89iXtC5h0DIbvW28HVze6DbdqUZ+wRaO3k/nP9kwZhRXvjqAzf04DZeYbGfoaTtY HwdwDKF4f4T9gZnPkuip1gmLzoyEaX1tjcd3gu2fZgPA9NXK8Ey5/qfZzs2RgSl9mYiy zeuwPWPr+ZKUXOM2EEEdwYZaI3bTtWpfORl0DyLa5yKF4B9UOP42oDwy8CjWCx5cMfZs zG5g== X-Gm-Message-State: AC+VfDyFDBaXRtPsFBBQgImbb7XyH03RHL16Jvdz+UuNjuCCnukLG367 zI+8df4IKdyCdMa+fC3QsbNB3cbwwIOhgrEAT7Qnvl8LuQDuGYFd/I6Csw== X-Google-Smtp-Source: ACHHUZ4DXPPeD/0cEud1wubrtjMW71EOlQKebCnuzplAJ4M23S6rQSRSy01FzcBz+aoMObDnA7+nd5fz5/YyjPjzX/c= X-Received: by 2002:a0d:d4d0:0:b0:55a:abf8:5c0d with SMTP id w199-20020a0dd4d0000000b0055aabf85c0dmr14029662ywd.21.1683635947701; Tue, 09 May 2023 05:39:07 -0700 (PDT) MIME-Version: 1.0 References: <641b1ca0-d33f-4f38-ae64-81b4abce24da@app.fastmail.com> In-Reply-To: <641b1ca0-d33f-4f38-ae64-81b4abce24da@app.fastmail.com> Date: Tue, 9 May 2023 14:38:56 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="000000000000981c2305fb420ab9" Subject: Re: [PHP-DEV] [RFC] Property hooks, nee accessors From: kontakt@beberlei.de (=?UTF-8?Q?Benjamin_Au=C3=9Fenhofer?=) --000000000000981c2305fb420ab9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, May 8, 2023 at 11:38=E2=80=AFPM Larry Garfield wrote: > Ilija Tovilo and I would like to offer another RFC for your > consideration. It's been a while in coming, and we've evolved the design > quite a bit just in the last week so if you saw an earlier draft of it in > the past few months, I would encourage you to read it over again to make > sure we're all on the same page. I'm actually pretty happy with where it > ended up, even if it's not the original design. This approach eliminates > several hard-to-implement edge cases while still providing a lot of > functionality in one package. > > https://wiki.php.net/rfc/property-hooks Thank you! Looks interesting, I will need to think about things before more qualitative feedback. An error maybe, the "class C" example in "Detailed Proposal > set" uses a "$this->_prop", but probably meant to use $this->_names, since private array $_names; is declared in the example. I think $field should be its own "chapter". Its a central part of the proposal that should be clarified early and so that readers don't accidentally skip it. I am also confused why $field exists when $this->propertyName works and why its not recommended to be used. Is $field a reference? or does the "compile time macro" part mean its replaced at compile time? Ifso, this feels different to anything else PHP, i am leaning towards $this->propertyName if there are no other compelling reasons why $field should be used. > > > -- > Larry Garfield > larry@garfieldtech.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --000000000000981c2305fb420ab9--