On 23/07/2021 10:58, Nicolas Grekas wrote:
Hi everyone,
I wrote everything down about the reasons why here:
https://wiki.php.net/rfc/nullable_intersection_types


IMO we should require brackets and forbid not using them when combining unions and intersections.

These types are already going to be confusing enough and we can likely save a fair amount of confusion and pain down the line by requiring the explicit brackets.

Without wanting to bikeshed, let's just make sure we're set on () because whatever we choose here will be the defacto mechanism for declaring sub-types in PHP for the rest of eternity so it would need to be maximally compatible with everything we might want to do with them.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to