Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123102 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 52A1A1A009C for ; Wed, 10 Apr 2024 20:18:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712780340; bh=+F8ViV3PZ2bvQG3ctsYRR8PyYNde3FR/A9Jg6z0ehfA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JO1dgmiylcWYPu7Fczzos1PcjGxT8Wkz9Tbj0wIQcF0skNfurH2z0E3kXfCEZnSrl Uo+bV3GyPZdZ9W2nuuDPI+n8StPjKiJlPdNDSjeAhGFSV1wf5O4r39dfZLPbBFiWwe L2Kay4oFoE+nl6ZnWkYDFqra6duQmsZwYQpShhDmII4zwpsfQIKIybxdL40smhdg/k xbHlhSeNJnvtJNtaBGvLciCT1d14BD7kGfeDbrKHdMapYp16q0pZyzkHUNZoslFY1t GYOozdrMoZ3SMRX9nByTvIKxoizHyF4pJAr63/56XrRaIgPWkDCf2h1Fhg6Gyw/PPK msZ2/EKhIEt5A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BE0F21805E5 for ; Wed, 10 Apr 2024 20:18:59 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,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=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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, 10 Apr 2024 20:18:59 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3442f4e098bso120024f8f.1 for ; Wed, 10 Apr 2024 13:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712780305; x=1713385105; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+F8ViV3PZ2bvQG3ctsYRR8PyYNde3FR/A9Jg6z0ehfA=; b=IexBOB7QUZGxRYLFRvnouFXKVakYShANgwTXsN8yXJpftyncbHkaUNiizUYLzviZ1h 1ZkkRfNr3HkSYKplndV/c3yUDvj24crF18Z9LMgx4yje+Tkr9H+gFW9Jqh/oZoSYOiw1 ewDqjXfdSHEMs60CbnMVfvI5ICt8YagJ7f/8GSfecmsu+4SWRzTcA8+YdKxIBV09WsqQ okeVxu4BqadBi2h8ozS5OZuMnW1G3wVOB6ztJ4cYL5DaDOOojMNvqkZ2UzNdAe6O77d+ FdhtCSfT+R2nstvRh/Gn9VqusAuUdfyxGn+VvcmNsvSZga1zHCA6qEz5TNSsABLqDrrR s6VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712780305; x=1713385105; 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=+F8ViV3PZ2bvQG3ctsYRR8PyYNde3FR/A9Jg6z0ehfA=; b=fK4ja2BPwPn72XSfBFGBsT76WJAepTnZVXW3UjWTsPjbfBS12/xvosxFRuLjgJTeu9 J2lKI/rqmxJnQh3E3jEJezDN+wxp6hKbKYEKk4VZ1topescNqDGs2iq9TrHxhrqfmwNp DO7NSgRJ9hO0ugf+808yWXyg2KDsy+0QElkPYZ6qSDZEvmpYYwYPYIoGY9+DM2Q+7Grg KVqWd32owVF5IFgaCjp80UimjUxw1QC0Ca3Fyxs2HI/49E8c8EaNHJSyH1dEzjgnwwH3 Y0/+Ks7MP0UuuaBde4QWAQJsEP1doHTFV2SUbvhbEsmh5Gh4/eIQIIvRqgjOz++Q+HX/ O9Pg== X-Forwarded-Encrypted: i=1; AJvYcCXPcDiuKwNVDv9c9OoALONOJo5SLk4b8bHd6IKB8cJWLSUVzba3llSvi7DLG55VSkC1OiSETI5SZWF6mcAvmKzRYFimNyH16Q== X-Gm-Message-State: AOJu0Yx0+hkYjD7RaoAH9HsdW5+9jCMJtGptwuMjKzlav9mEoLQ4gUPz NTj4l6HJDcsdKGUieZgHQPg9ub++5T3RonnOzCQ/oSNVFVHq3qwwKIWAosyKPRp+UK5qmAp3L1Z aZ9OVtIBFUCU5avgsZUx7jOi/eFQ= X-Google-Smtp-Source: AGHT+IH1cc9DUU4jVYc1ASMuhyoLunCpUbHFsJDJvH89ix6X82TbaTZnljZgsHU2roTB1bUF594US4+49NUWjYR+U+Y= X-Received: by 2002:adf:fc48:0:b0:343:7ed6:765a with SMTP id e8-20020adffc48000000b003437ed6765amr512892wrs.20.1712780304883; Wed, 10 Apr 2024 13:18:24 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <66154AA0.1040905@adviesenzo.nl> <66160A1D.4060409@adviesenzo.nl> In-Reply-To: Date: Wed, 10 Apr 2024 23:17:48 +0300 Message-ID: Subject: Re: [PHP-DEV] [RFC][Vote announcement] Property hooks To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: Juliette Reinders Folmer , internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000a6a8400615c3bd7e" From: arvids.godjuks@gmail.com (Arvids Godjuks) --000000000000a6a8400615c3bd7e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 10 Apr 2024 at 22:31, Tim D=C3=BCsterhus wrote: > Hi > > On 4/10/24 10:28, Arvids Godjuks wrote: > > The amount of complexity in these two hooks is on the level of the whol= e > > PHP OOP model with the number of footguns and WTF cases to rival magic > > quotes, register_globals=3Don and every other infamous gotcha we had in= the > > engine that got deleted out of existence. > > As someone who read the RFC like 20 times while it evolved (and just > read it once more before submitting this email): > > Most of what the RFC spells out explicitly, because that's what RFCs > need to, is a pretty much natural consequence of how the existing PHP > features work. You cannot really shorten the RFC without either making > it underspecified or useless. > > Is there some syntax that could technically be omitted? Sure. Would > doing so meaningfully simplify the RFC? No, because most of the text > length comes from the interaction of existing syntax and semantics with > hooks and thus is an inherent property of property hooks (pun not > intended). It's not the RFCs fault that references exist, or that > casting an object to an array is legal, or whatever else needs to be > explicitly spelled out. > > I also believe that the chosen syntax fits nicely with the existing > syntax, borrowing syntax where useful and inventing new syntax where the > existing syntax does not provide anything. > > It's a clear improvement over the status quo of __get() and __set(), > especially from a third-party tooling perspective. I'm in favor. > > Best regards > Tim D=C3=BCsterhus > Yeah we had a discussion with Larry on SF Slack, he made some things clear that it's either all or nothing, because once they dove in, it became clear that there's no way to gradually to introduce it. So, if it passes, the community is just gonna have to deal with the massive scope of it if they want the hooks or forget about them. --=20 Arv=C4=ABds Godjuks +371 26 851 664 arvids.godjuks@gmail.com Telegram: @psihius https://t.me/psihius --000000000000a6a8400615c3bd7e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, 10 Apr 2024 at 22:31, Tim D= =C3=BCsterhus <tim@bastelstu.be&= gt; wrote:
Hi
On 4/10/24 10:28, Arvids Godjuks wrote:
> The amount of complexity in these two hooks is on the level of the who= le
> PHP OOP model with the number of footguns and WTF cases to rival magic=
> quotes, register_globals=3Don and every other infamous gotcha we had i= n the
> engine that got deleted out of existence.

As someone who read the RFC like 20 times while it evolved (and just
read it once more before submitting this email):

Most of what the RFC spells out explicitly, because that's what RFCs need to, is a pretty much natural consequence of how the existing PHP
features work. You cannot really shorten the RFC without either making
it underspecified or useless.

Is there some syntax that could technically be omitted? Sure. Would
doing so meaningfully simplify the RFC? No, because most of the text
length comes from the interaction of existing syntax and semantics with hooks and thus is an inherent property of property hooks (pun not
intended). It's not the RFCs fault that references exist, or that
casting an object to an array is legal, or whatever else needs to be
explicitly spelled out.

I also believe that the chosen syntax fits nicely with the existing
syntax, borrowing syntax where useful and inventing new syntax where the existing syntax does not provide anything.

It's a clear improvement over the status quo of __get() and __set(), especially from a third-party tooling perspective. I'm in favor.

Best regards
Tim D=C3=BCsterhus

Yeah we had a discussion with Lar= ry on SF Slack, he made some things clear that it's either all or nothi= ng, because once they dove in, it became clear that there's no way to g= radually to introduce it. So, if it passes, the community is just gonna hav= e to deal with the massive scope of it if they want the hooks or forget abo= ut them.
--

Arv=C4= =ABds Godjuks
+371 26 851 664
Teleg= ram: @psihius=C2=A0https= ://t.me/psihius
--000000000000a6a8400615c3bd7e--