Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-06 Thread Alexandru Pătrănescu
> On Tue, 5 Oct 2021 at 23:58, Alexandru Pătrănescu > wrote: > > > But there is one more small elephant in the RFC that I believe should be > > discussed. > > null|false type will not be a nullable named type but it will be an union > > between two named types. > > > > It's not totally

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-06 Thread G. P. B.
On Mon, 4 Oct 2021 at 04:33, Levi Morrison wrote: > I don't see the word `void` in the RFC. I think there ought to be > something said about how naked `null` is different or not different > than `void`. Added a section which attempts to explain the difference between both. On Mon, 4 Oct 2021

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-05 Thread Alexandru Pătrănescu
On Sat, Oct 2, 2021 at 6:07 PM G. P. B. wrote: > Hello internals, > > I'm proposing a new RFC to make 'null' usable as a standalone type. > > RFC: https://wiki.php.net/rfc/null-standalone-type > GitHub PR: https://github.com/php/php-src/pull/7546 > > Best regards, > > George P. Banyard > Hey

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-05 Thread David Gebler
On Tue, Oct 5, 2021 at 3:45 PM Nikita Popov wrote: > On Tue, Oct 5, 2021 at 4:08 PM Côme Chilliet wrote: > > > Le lundi 4 octobre 2021, 10:09:12 CEST Nikita Popov a écrit : > > > If we make this change, I would however suggest to also support "false" > > as > > > a standalone type. I think this

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-05 Thread Mike Schinkel
> On Oct 2, 2021, at 11:06 AM, G. P. B. wrote: > > Hello internals, > > I'm proposing a new RFC to make 'null' usable as a standalone type. > > RFC: https://wiki.php.net/rfc/null-standalone-type Regarding the RFC's proposed disallowing of `?null`, is that really needed? Obviously it doesn't

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-05 Thread Lynn
On Tue, Oct 5, 2021 at 4:08 PM Côme Chilliet wrote: > > Why would function a(): null|false {} be legal but function b(): null|0 > would not? > > This is inconsistent to me. And adding null, then false, then true for the > sake of completeness feels like avoiding to treat the static value as type

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-05 Thread Nikita Popov
On Tue, Oct 5, 2021 at 4:08 PM Côme Chilliet wrote: > Le lundi 4 octobre 2021, 10:09:12 CEST Nikita Popov a écrit : > > If we make this change, I would however suggest to also support "false" > as > > a standalone type. I think this change primarily has benefits from a > > typesystem

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-05 Thread Levi Morrison via internals
On Tue, Oct 5, 2021 at 8:08 AM Côme Chilliet wrote: > > Le lundi 4 octobre 2021, 10:09:12 CEST Nikita Popov a écrit : > > If we make this change, I would however suggest to also support "false" as > > a standalone type. I think this change primarily has benefits from a > > typesystem completeness

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-05 Thread Côme Chilliet
Le lundi 4 octobre 2021, 10:09:12 CEST Nikita Popov a écrit : > If we make this change, I would however suggest to also support "false" as > a standalone type. I think this change primarily has benefits from a > typesystem completeness perspective rather than a strong practical need. > From that

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-04 Thread Nikita Popov
On Mon, Oct 4, 2021 at 5:33 AM Levi Morrison via internals < internals@lists.php.net> wrote: > On Sat, Oct 2, 2021 at 9:07 AM G. P. B. wrote: > > > > Hello internals, > > > > I'm proposing a new RFC to make 'null' usable as a standalone type. > > > > RFC:

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-03 Thread Levi Morrison via internals
On Sat, Oct 2, 2021 at 9:07 AM G. P. B. wrote: > > Hello internals, > > I'm proposing a new RFC to make 'null' usable as a standalone type. > > RFC: https://wiki.php.net/rfc/null-standalone-type > GitHub PR: https://github.com/php/php-src/pull/7546 > > Best regards, > > George P. Banyard I don't

[PHP-DEV] [RFC] Allow null as standalone type

2021-10-02 Thread G. P. B.
Hello internals, I'm proposing a new RFC to make 'null' usable as a standalone type. RFC: https://wiki.php.net/rfc/null-standalone-type GitHub PR: https://github.com/php/php-src/pull/7546 Best regards, George P. Banyard