On Tue, Nov 16, 2021 at 3:59 PM James Gilliland <neclim...@gmail.com> wrote:

> On Tue, Nov 16, 2021 at 4:23 AM Rowan Tommins <rowan.coll...@gmail.com>
> wrote:
>
> > On 16/11/2021 09:27, Andreas Heigl wrote:
> > >
> > >> I see, yes, code that is 100% perfectly tested can get away without
> > >> the language performing any error checking at all - the behaviour is
> > >> all guaranteed by the tests. I would be very surprised if even 1% of
> > >> PHP applications can claim such comprehensive tests.
> > >
> > > The topic here was that new code can verify the declaration of a
> > > property by using tests. That does not need to happen on the language
> > > level. I was never talking about adding tests for existing code.
> >
> >
> >
> > For most code bases, even new ones being written from scratch in PHP
> > 8.0, that level of testing simply doesn't exist, and having the language
> > tell you "hey, you wrote $this->loger instead of $this->logger" is a
> > useful feature. And, in a lot of cases, more useful than having the
> > language say "OK, I've created your dynamic $loger property for you",
> > which is what currently happens.
> >
>
> What you described there sounds like a warning and not a fatal error. Maybe
> that's where some of the trepidation is coming from. I know I'm less
> worried about the deprecation notice and more worried about what happens in
> PHP 9 when it's a fatal error.
>

I can't say that this line of reasoning has its merits, but then there's no
benefit to the engine itself. Issuing a warning and carry on materializing
dynamic properties will never bring the original performance improvement
that was part of the original state of the RFC.

-- 
Marco Aurélio Deleu

Reply via email to