śr., 26 maj 2021 o 12:14 Joe Watkins <krak...@php.net> napisał(a):

> Hi internals,
>
> In response to: https://bugs.php.net/bug.php?id=78480
>
> I implemented: https://github.com/php/php-src/pull/7029
>
> Not absolutely convinced that it's a good idea, I asked Nikita to review,
> and he's unconvinced also and suggested a discussion should be started.
>
> You can read both of our thoughts about it on the PR.
>
> What I'm looking for now, is reasons that we are wrong - good use cases
> that aren't born from code that is doing bad things ...
>

IMHO we don't need it, working with the typed properties since the
beginning
I thought only for a short period that I'd need this kind of feature but
shortly realized
that I'm doing it wrong if my code can reach such state,
given that all paths now lead to a known state,
object construction in all cases specifies all required properties
without having any doubts like uninitialized properties so this is doable.

If one really needs to check if a property is initialized or not I consider
it a dark magic
and such can reach up to the reflection mechanism to just check it.
IMHO it's not common (or at least should not be) to have such a need.

Cheers,
Michał Marcin Brzuchalski

Reply via email to