> On Nov 4, 2020, at 1:38 PM, Eugene Sidelnyk <zsidel...@gmail.com> wrote: > > 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`?
I would rather let an instance be “empty” than to have a unique, separate thing that always represents nothing. To be fair, I don’t know the specific NullObject implementation here - based on presumption - I would intentionally be creating something that represents nothing. See also this RFC: https://wiki.php.net/rfc/objects-can-be-falsifiable <https://wiki.php.net/rfc/objects-can-be-falsifiable> - sounds like this thread might bring more supporters to that table/discussion. Cheers, Josh