Re: [RFC] Disjunctive Normal Form Types
| From: | Eugene Sidelnyk | Date: | Sat, 19 Mar 2022 16:46:05 +0000 |
| Subject: | Re: [RFC] Disjunctive Normal Form Types | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117380@lists.php.net to get a copy of this message | ||
Looks very interesting, and most importantly, useful.
On Sat, Mar 19, 2022 at 6:38 PM G. P. B. <george.banyard@gmail.com> wrote:
> Hello internals,
>
> I would like to open the discussion on the Disjunctive Normal Form (DNF)
> types RFC:
> https://wiki.php.net/rfc/dnf_types
>
> The implementation for it is available on my fork, [1] but currently relies
> on a pending PR [2] to make the implementation simpler.
>
> DNF types are a way to mix intersection and union types together in a
> single type.
> For example:
> - (A&B)|null
> - (Traversable&Countable)|array
>
> Best regards,
>
> George P. Banyard
>
> [1] https://github.com/Girgias/php-src/pull/10
> [2] https://github.com/php/php-src/pull/7309
>