Yeah... Creating null was a huge mistake.
Now it is probably too late to fix that (maybe some new language can
introduce that).

But what do you think about introducing special class `NullObject`?

On Wed, Nov 4, 2020, 9:32 PM Christian Schneider <cschn...@cschneid.com>
wrote:

> Am 04.11.2020 um 19:39 schrieb Eugene Sidelnyk <zsidel...@gmail.com>:
> > Thus, can you provide any other dangerous example?
>
> I think at this point you could have realised that it is
> a) a BC break (code which has thrown an exception before now wouldn't)
> b) not finding any love among the community here. Possibly for a reason?
>
> If you really want you could put an RFC together but I'm pretty sure that
> it wouldn't be accepted.
>
> And now for your dangerous example:
>         try {
>                 $foo = null;
>                 $foo->bar();
>                 deletel_all_files_on_machine();
>         } catch (Error $dummy) {}
>
>
> Regards,
> - Chris
>
>

Reply via email to