Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124798 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 C06A21A00B7 for ; Tue, 6 Aug 2024 09:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722935025; bh=A2qF6CyyaHM1opx8fG6Paj8NvMHT/mqdbKzwG/+aCyc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Wkx3LNiLkvESbginozU4b74GcnvW20LQbO5CsUt/qOW3rMfulamCToQL+o5va0e6I fThmzf9wfBgdoZ9/Ry1PDdEV/vnz2wrKUKc5vmRqIRxCaAVEUi7Jof43O4+GWT2OXZ TesiQ3DfZydky4+vpJtuVA7p6Qa2GeD8Tkfj8H6A1NR0pciEc7CJU1s16vikyaLqmB GzKp/3WdBec0o16OufU0xT6OY5Qxa972iDJFbkXOu+wCPeGQgn6ddf3tQ5xwAaddpA 1sjR6lqoPZPxnLrF2jXdcAeDSpzygzflK2H22MydDDchAVIH2d9RPiMPqFHv63YQmJ QaiGVNVmFeajg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 248EE18033A for ; Tue, 6 Aug 2024 09:03:42 +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,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 ; Tue, 6 Aug 2024 09:03:39 +0000 (UTC) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 89F3A4E407A9 for ; Tue, 6 Aug 2024 09:01:56 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3744C5FA72 for ; Tue, 6 Aug 2024 09:01:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 88E391C229F4A for ; Tue, 6 Aug 2024 11:01:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chilliet.eu; s=dkim; t=1722934915; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=A2qF6CyyaHM1opx8fG6Paj8NvMHT/mqdbKzwG/+aCyc=; b=jfIbgMQhFXDcZb0EVXBXKFS9L95NDLeS8hjbqr5ytXTh8ygYwyglquUDayxYr4bacBfueF TvBJQJ4SU4SbFvQmLC2ISBdvdPu/YamNUjDDfdXXG8dhv/Jwh7wabKEwSj3kJTarkZ9db+ aa7jbhr+9EMpgWqA6FHGBCGnOGL0qLa054/RsF8imOR+Haf7KoR5+qHdifuMOwh2N9ebMy a+HIZqME3MHyd/1pDe2vAPMf0VSjtXl+NqWnEOd0jjEdgiG9AiFl6y7//tk52n4lx3dS/h RQQ6j3PImy2fgAuf18a76BlevIPZIevPRU9VCaL8Gcj4cSZ3BuPU/mQyGi5JGg== To: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Lazy Objects Date: Tue, 06 Aug 2024 11:01:54 +0200 Message-ID: <4584782.LvFx2qVVIh@come-prox15amd> In-Reply-To: References: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Last-TLS-Session-Version: TLSv1.3 From: come@chilliet.eu (=?ISO-8859-1?Q?C=F4me?= Chilliet) Le mardi 4 juin 2024, 14:28:53 UTC+2 Nicolas Grekas a =C3=A9crit : > Dear all, >=20 > Arnaud and I are pleased to share with you the RFC we've been shaping for > over a year to add native support for lazy objects to PHP. >=20 > Please find all the details here: > https://wiki.php.net/rfc/lazy-objects >=20 > We look forward to your thoughts and feedback. >=20 > Cheers, > Nicolas and Arnaud >=20 Hello, I=E2=80=99m a bit late to the party, but after reading the RFC I still do n= ot understand the difference between Ghost and Proxy. I do understand the technical internal difference, I think, of 1 vs 2 objec= ts, and the API differences of passing a constructor vs a factory function. But I do not understand the difference from the caller point of view, how w= ould I choose when to use one or the other depending on my usecase? What does Proxy allows that Ghost do not? Or do Proxy only make sense when returning a parent class from the factory = method? C=C3=B4me