Re: [RFC] Lazy Objects

From: Date: Thu, 18 Jul 2024 07:12:45 +0000
Subject: Re: [RFC] Lazy Objects
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Le jeu. 18 juil. 2024 à 00:13, Larry Garfield <[email protected]> a
écrit :

> 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.
>

🤞


Thread (95 messages)

« previous php.internals (#124465) next »