Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124465 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 E36A31ADF7D for ; Thu, 18 Jul 2024 07:13:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1721286878; bh=USQM95xHDMlS1DzGI4lz0nsRCuf/lxLBEaUVHWX8P9s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Pd5fyHbUASJfzEI2ajHz7auqTlZ4EQ9f+d2ZaBQmH7yt1CBmmTRKaNA7RU47R04uD e5PHKSaMD1tHnmO9s5TynDUvJCI7wL2Ne8SmR+RzxMYv8Eswx49tzQp0XAOit5mlqv saNqVwp/JWmN/clCEUaPS0xvLBuu2vxeqGqlT4WIabDxv4gR7u2wt5oGydbTcaaGVE efiarq1mbEhIdwvfBUyJaRFi8iyOyKTQWgMwHAVWa+K9kx0Xshyg0viOtTE3Z1UAda CVDjf5Sn8aVT73WKNd1hwJcwxq/Dt+GrYMl/YrNKRuPbWfKjiQ37CsSnLQKVGiHEuH L90fBLK3iQUDQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 48E391801EB for ; Thu, 18 Jul 2024 07:14:36 +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 autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 ; Thu, 18 Jul 2024 07:14:32 +0000 (UTC) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-52e9c55febcso697198e87.2 for ; Thu, 18 Jul 2024 00:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721286781; x=1721891581; 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=iyZYKqrAFN3PNsYnYUE4p9DXVsByYxlWMePPcSsAHoE=; b=MlzdMxE+2OgwvIjxKgszjwV4LQxviQ9+hy7K8WjETtll7vQSS9xCUYtKmD+Fq5DfOg BRsHHjOO3p4ZGQi88po2nzfezHRkCkEqR8DrR/GQ4flLqMaYq8HxevAH6JBg7a5rKbIj pQ64FwgMdC9HhEyFmMgPu50TvgeJDhrcSKoywqCT833Q9Zbd/jzcj1X4P00qbSqGH+db gJyp1YnOcDkdMhKZ+lQqjHWm/Uf8mexxg/H0vNa/eGco9fcsAp17JI6lpVMsJEMQYPZU M4MJYx+GVpZgHzBDT3+37qeLgzwNglLrNUuTZdzNhUbyGWx21zEe15E5A/F/ilsvruV0 I6JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721286781; x=1721891581; 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=iyZYKqrAFN3PNsYnYUE4p9DXVsByYxlWMePPcSsAHoE=; b=EsxPVVauOzWlhNTLadaoWAiEt4I4O3AJiVcHiqeRBBhz32x2VBguqu4+VWa+beUMrO Qqh6+0aZL/sbo+rieEaoSNm4kSTxfty1YzIELj9RCERsuSpeFQjUO0EykFMrLTnJM4iC RBm7IdtjgrrBs6TnX8qp6S18imPGIjBH7EUEwaFhdITCCM/KGfUQwoitRaUNiMTogM9P t1NfXYSA9JPeGYVCJyzX53gyko2wAVfZkAeT4DIPsslggEfSfQ6b3sA0gK7VGg8UJLQh UwvvSlPdSwq98jlT7zT0fvjxM4fgk/WSFNNfUONgrBikHNatBg/5VfQqTxbvWMD0OC2t r9cQ== X-Gm-Message-State: AOJu0YzbWce72ys6FIQpdoNd0Ml9+17FAG7VBovuQe0XUQD2uP94uLzH A0qH5kJ7mVStMdBrUxa6JgOEMqnE4V605xxwFWri/cs/rfcpEJeZ/N1R/DyS/oYyOekSkpd6Xlr 7nake8JVkqLsNq298RNSxUowQ11kBh+HVT1M= X-Google-Smtp-Source: AGHT+IHbpI933HdWc0IxxJVeZn6Tb+tuHpZP7tPF/KAuR5KvTNlF545RuaCl3UdHMeS6YGMX2CYoEeZl5rIrJf7dgM0= X-Received: by 2002:ac2:4e10:0:b0:52c:e05e:849b with SMTP id 2adb3069b0e04-52ee53d85b6mr3011927e87.39.1721286780565; Thu, 18 Jul 2024 00:13:00 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <1118bbcd-a7b4-47bf-bf35-1a36ab4628e1@bastelstu.be> <45847b93-02bf-459f-bcd2-81ba35a12c24@bastelstu.be> <46bd4098-2936-4e46-98e9-fe55118325c2@bastelstu.be> <61ab36bc-b045-452a-84e0-87367d4c680e@bastelstu.be> <07e065f2-8f64-4bad-9a98-51f4eaf63ddb@app.fastmail.com> <2a0a4650-c2c5-4c6d-ad3a-25365b3391b2@bastelstu.be> In-Reply-To: Date: Thu, 18 Jul 2024 09:12:45 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] Lazy Objects To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000001cc34b061d804ff2" From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000001cc34b061d804ff2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le jeu. 18 juil. 2024 =C3=A0 00:13, Larry Garfield = a =C3=A9crit : > On Wed, Jul 17, 2024, at 6:31 PM, Nicolas Grekas wrote: > > > A bit unrelated to the above topic: we've further clarified the RFC by > > addition restrictions to what can be done with lazy proxies. Namely, > > when the factory returns an object from a parent class, we describe > > that adding more on the proxy class would throw, and we also explain > > why. We also added a restriction to prevent a proxy from having an > > overridden __clone or __destruct when the factory returns a parent, and > > explained why again. > > > > This should simplify the overall behavior by preventing edge case that > > wouldn't have easy answers. If those limitations prove too restrictive > > in practice (my experience tells me they should be fine), they could be > > leveraged in the future. > > > > On our side, this should close the last topics we wanted to address > > before opening the vote. > > > > Please let us know if anyone has other concerns. > > > > Cheers, > > Nicolas > > Minor point: Why is the $initializer return type null, instead of void? = I > don't see a purpose to allowing an explicit null return and nothing else. > Updated to use "void". Both would work :) > Otherwise, I'm quite looking forward to this. > =F0=9F=A4=9E --0000000000001cc34b061d804ff2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
Le=C2=A0jeu. 18 juil. 2024 =C3=A0=C2= =A000:13, Larry Garfield <larr= y@garfieldtech.com> a =C3=A9crit=C2=A0:
On Wed, Jul 17, 2024, at 6:31 PM, Nicolas = Grekas wrote:

> A bit unrelated to the above topic: we've further clarified the RF= C by
> addition restrictions to what can be done with lazy proxies. Namely, <= br> > when the factory returns an object from a parent class, we describe > that adding more on the proxy class would throw, and we also explain <= br> > why. We also added a restriction to prevent a proxy from having an > overridden __clone or __destruct when the factory returns a parent, an= d
> explained why again.
>
> This should simplify the overall behavior by preventing edge case that=
> wouldn't have easy answers. If those limitations prove too restric= tive
> in practice (my experience tells me they should be fine), they could b= e
> leveraged in the future.
>
> On our side, this should close the last topics we wanted to address > before opening the vote.
>
> Please let us know if anyone has other concerns.
>
> Cheers,
> Nicolas

Minor point: Why is the $initializer return type null, instead of void?=C2= =A0 I don't see a purpose to allowing an explicit null return and nothi= ng else.

Updated to use "void"= ;. Both would work :)

=C2=A0
Otherwise, I'm quite looking forward to this.

=
=F0=9F=A4=9E
--0000000000001cc34b061d804ff2--