Re: Re: Issues with readonly classes

From: Date: Thu, 22 Sep 2022 17:47:57 +0000
Subject: Re: Re: Issues with readonly classes
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-118689@lists.php.net to get a copy of this message
On Tue, Sep 20, 2022, at 1:07 PM, Jordan LeDoux wrote: > On Sun, Sep 11, 2022 at 8:22 AM Larry Garfield <larry@garfieldtech.com> > wrote: > >> >> >> Hm. I seem to recall during the discussion of readonly classes someone >> saying that object properties of a readonly class had to also be readonly >> classes, which would render the above code a compile error. However, I >> just checked and that is not in the RFC. Was it removed? Am I imagining >> things? Anyone else know what I'm talking about? :-) >> >> --Larry Garfield >> >> > I remembered the same thing, and am similarly baffled. How did the RFC pass > if you can do something as simple as public readonly stdClass > $var;? I > thought I followed the discussion on that RFC, but apparently I missed > something. I would have expected an example like above to block acceptance > of the RFC. To be clear though, I'm mostly confused about what the > convincing argument about this was, or if it was something that everyone > else viewed as an uncontroversial aspect? > > Jordan Does anyone else recall this? Máté, are Jordan and I just imagining things? --Larry Garfield

« previous php.internals (#118689) next »