Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124576 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 A91FB1A00B7 for ; Wed, 24 Jul 2024 15:23:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1721834730; bh=LEUEPBSC0wvKkXBPTWPzVnnaZ58Kq0Ky8vZ/ZPp83u8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=D3CqpjZcj3ee/6X8j04XTHcnHytLn2yjpO6q/LA/aUChAWdi7vdG7jCyd+gO5p/6k leWpz9BCvmaZZBieX8x8ELq79YZVjFKKvcX2YhgtR83JRjM/7URmoqyFMBuuwoIY9z 4ahVAcxtJL87Gii2VeRINIdkFwd397TEShoRIwn77zgR7Te7SZRazU7oRK1PGfZKWl ZyFNvttakcstftPePlb67+VPOgEYK2mL0aTsd3Csa/YdDkb6u9gAJzCLvNT9kTgafF 5YRQcYWFxnQJwDiQ0xE7qJ1AyRuqxp7HjSrm+hi61Linirsxu7W2FhinWMNgRTURE7 OrxXwYyWSdu0g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E1485180039 for ; Wed, 24 Jul 2024 15:25:29 +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-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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, 24 Jul 2024 15:25:29 +0000 (UTC) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-52f04c1e58eso4806600e87.3 for ; Wed, 24 Jul 2024 08:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721834633; x=1722439433; 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=LEUEPBSC0wvKkXBPTWPzVnnaZ58Kq0Ky8vZ/ZPp83u8=; b=eBTxpLpot8kSZSkMinTNtVH3otVU0bn56z3u6tpICUvkG11mGHje6CFgSVU2XYIGY8 TCAW2lp4xtkzZQN6xICAvg0qX6WErUcqd1d+1OqdvKTU4mIZU7YLjSx6GDcYakUwBdN1 SCxCjH3Kyfsyt4MQtDIbY6Py61rQrdsT63Pz1HuDcm4MgMYomkJHIg+soY4JhL+6YSlw yclj8jjk/W4XVfvimy91v0kM1EcC4ftLeVtJbqmmKOYDCX/uuiQTrYc/5hthfHBpyzCi SCLzJw2BAlT3bsf1E+ZV6hyteBMz8bf2pzmg3C+HAGMYPz1vDEQHQ835WMzTDeA8KgGz UuSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721834633; x=1722439433; 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=LEUEPBSC0wvKkXBPTWPzVnnaZ58Kq0Ky8vZ/ZPp83u8=; b=ie6K7yQUOyWhDSXkQq013d4wljR/tGBJtjRuBOGmmOoKKQLZaq6IBThFj/+CkvMOKQ WxbvLzN/gwFhqIVno5BKf3MQmQM85hsAYZMM+z+z5kzMWDY2eNkjHCEtmNXuM5JfW2v/ qrAisyAd6yqTqSxHdBV0bzKa/qv4IngyR4PiXTMpydReJvy5N1LCDbIomuNtIH7sf9id 2gbvANwvt3PKDJgX2ezP7fq1Kcv+qCccM2Db6IbZHPyDFyvM55tUq2m6UzrSnMp56Axh PrrelgbTS1j2w4x2Ju0mtQBQOMtExSVxAuiuOl1g2v++fY8/6zQmevexTznxolh+/5f9 V5xQ== X-Forwarded-Encrypted: i=1; AJvYcCXoQugNMEBB40+FG8buVbqH6/bb5DHRDviMF/8JHOOPcD7/8zueGvZ1SX2nZRY8sfUt8SA/rO7IlrHzfZ+fBDpNaNIOQNdQtg== X-Gm-Message-State: AOJu0YyjIBgZ+bbBAughaDxJxhVVuyWgbNPMQTldv2yBbkHoUYDQy9NC 185CYBq1vT2IbooxZ0KuIF/mE4v0FcoqeJUbBgUIjEq2ieMObR9FXaPHVDVi8CJBhHYzzkie1ps wDOD6T4XmiOR9GlJm1VUfuSe1kBg= X-Google-Smtp-Source: AGHT+IFXmeLibX7kXMTpHLlshxWjcis2uCRd9KU47DL8kDeCP/hEkRqSbnIKqSgBQRezPjI4jDYHHvEP0fbCKvK86uU= X-Received: by 2002:a05:6512:b15:b0:52c:dba2:4f1 with SMTP id 2adb3069b0e04-52fd3f81c2dmr41159e87.48.1721834633152; Wed, 24 Jul 2024 08:23:53 -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: Wed, 24 Jul 2024 17:23:39 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] Lazy Objects To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: Rob Landers , =?UTF-8?Q?Benjamin_Au=C3=9Fenhofer?= , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000abd648061dffddf0" From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000abd648061dffddf0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Le jeu. 18 juil. 2024 =C3=A0 21:58, Tim D=C3=BCsterhus a= =C3=A9crit : > Hi > > On 7/17/24 20:31, 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, wh= en > > 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. > > Note that in the RFC you typoed it as '__destructor' ('or' suffix). > > > Please let us know if anyone has other concerns. > > I've replied regarding the cloning semantics in an earlier email. > > Regarding the `reset*()` methods even with the additional examples I > remain unconvinced that this is not only necessary to work around > existing design issues in userland libraries. However I guess that we > will not reach an agreement here and I also do not consider myself the > target audience of this RFC. I'm just here to find edge cases :-) > > Except for the cloning semantics I cannot find any obvious problems with > the described semantics. > Cloning has kept us busy in the last days and after many brainstorming sessions, we've decided to follow your initial proposal : make the clone operator trigger the initialization of the original object before cloning it. The RFC is updated, with a note about "Lazy cloning" in the "Future scope" section. Since this should be the last topic in this thread, we plan to open the vote on Friday. I invite everybody to give the RFC a new read. Thanks, Nicolas --000000000000abd648061dffddf0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Le=C2=A0jeu. 18 juil. 2024 =C3=A0=C2=A021:58,= Tim D=C3=BCsterhus <tim@bastelstu.b= e> a =C3=A9crit=C2=A0:
Hi

On 7/17/24 20:31, 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, w= hen
> the factory returns an object from a parent class, we describe that ad= ding
> 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<= br> > __destruct when the factory returns a parent, and explained why again.=

Note that in the RFC you typoed it as '__destructor' ('or' = suffix).

> Please let us know if anyone has other concerns.

I've replied regarding the cloning semantics in an earlier email.

Regarding the `reset*()` methods even with the additional examples I
remain unconvinced that this is not only necessary to work around
existing design issues in userland libraries. However I guess that we
will not reach an agreement here and I also do not consider myself the
target audience of this RFC. I'm just here to find edge cases :-)

Except for the cloning semantics I cannot find any obvious problems with the described semantics.


Cloning has kept us busy in the last days and after many brainstorming ses= sions, we've decided to follow your initial proposal : make the clone o= perator trigger the initialization of the original object before cloning it= .

The RFC is updated, with a note about "Lazy= cloning" in the "Future scope" section.

Since this should be the last topic in this thread, we plan to open t= he vote on Friday.

I invite everybody to give the = RFC a new read.

Thanks,
Nicolas
--000000000000abd648061dffddf0--