Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120215 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22530 invoked from network); 9 May 2023 07:39:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 May 2023 07:39:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B27E01804DF for ; Tue, 9 May 2023 00:39:56 -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.7 required=5.0 tests=BAYES_05,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-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (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 00:39:56 -0700 (PDT) Received: by mail-yb1-f176.google.com with SMTP id 3f1490d57ef6-b9ef06cb784so7156109276.0 for ; Tue, 09 May 2023 00:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683617995; x=1686209995; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U0C5mUwbwhWckLTc0xOqBPt5A6gUQ0062XVW6+m+5pY=; b=Hcytp+qaIC0jctwGp/Zc0FHxVkSDsI9I0gj7PeOKpb8Udo6FW5kwbVqFs3UdKTiEiM 0SlgcAcMaTyaxgrtdPoka5uMw9b6PmmWrE0lgnbrtMtd3QaQ0YhhLlTpXOWj5lXw7ktD pbJ6P8T8xqnnHKs7lfLV85NUhhpMxLA81H39hXumoitp+a2Quizx7VryB685TmJnFMhF 5utASZgLEnrrg5J+BgaA9sUdr+3hsyvsNd9lLpx6psfBNcIDh90rx+PodVXbLVKQOeCt AV3P7DIsYiwqjZAr7x4xKbe/S6i8GZWlv8yva2mY9vUmrJv+UclIvIrUvwVSZG2Lbsgs 2C+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683617995; x=1686209995; 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=U0C5mUwbwhWckLTc0xOqBPt5A6gUQ0062XVW6+m+5pY=; b=h+CGzdnux1R/v0NFBzlVLI16lgWMnyLDY8A+5TIE73/jw+Plx2VUZN/9i7FCE77E71 eDYYXEMpwlmXmWaZDv79e21Yol4SaafTdwLDTLM165DxACcbvmXHxQaP2tWvmYMzJdjN CKzGMcGfD9NMfv3gHW/tfV8eMHU8xBFzJkBgZYRQI8JzMI6hdQdPAelU9LvU+5jkcZhN E7FinrdLRb7w5urKKfU1JxU5keNN2mKqerNd0SExEgJOl3VJBretLAYWo7rnCGBNeCF3 3GtDeyEKnf4GNMp4JTK57FEP+S/mHcFMYW8/IBGQslpmx7Xd+TdA7uXLNnt070YYY7Ws exZg== X-Gm-Message-State: AC+VfDyOMwWYAfuAdFXXdSq/T/E27htRrEh1w49cgeRcIWkV0XOJEVLq 5MSTKaceyQjth+jsU6uO5llb1WS08DzoqpoLhGY= X-Google-Smtp-Source: ACHHUZ77f4KKWc0A8JcoRqtzQniulQa0AEmv9jCrEBNCjcjHJPSFPv5dnAx5KBXdSaXbaPxW2v5xchHcWHCJfguvUBA= X-Received: by 2002:a25:20d5:0:b0:b9d:b255:d726 with SMTP id g204-20020a2520d5000000b00b9db255d726mr12348118ybg.42.1683617995199; Tue, 09 May 2023 00:39:55 -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 09:39:44 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000008a9ab405fb3ddc0b" Subject: Re: [PHP-DEV] [RFC] Property hooks, nee accessors From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --0000000000008a9ab405fb3ddc0b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Larry, pon., 8 maj 2023 o 23:38 Larry Garfield napisa=C5= =82(a): > 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 > Using $this->propertyName directly is supported, but not recommended. Why is that? IMHO in the scope of accessor this is much clearer to me than using the $field. > The following example does make use of $field, however, and thus a backing value will be created, and write operations will simply write to the property as normal. This looks like new magic to me, whether we allow setting and baking the value explicitly or not. I consider this behavior confusing. Overall I vote yes. Cheers, Micha=C5=82 Marcin Brzuchalski --0000000000008a9ab405fb3ddc0b--