Re: [RFC] Nullable intersection types

From: Date: Fri, 23 Jul 2021 16:28:12 +0000
Subject: Re: [RFC] Nullable intersection types
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-115568@lists.php.net to get a copy of this message
Le 23/07/2021 à 18:25, Larry Garfield a écrit :
Requiring parenthesis now leaves the option open in the future to make them optional when doing full mixed types. Making them optional now requires that they be optional in the future when doing full mixed types. I vaguely recall there being some potential issue with making them optional for full mixed intersection/union types, but not the details. Either way, it's a not-small decision to make, and may have complicated implications for future work. It shouldn't be made on "eh, seems nicer" grounds in a post-freeze last minute RFC. Making it required now is the safer option, as it allows more flexibility in the future once someone tries to implement full union/intersection mixing. Making it optional later may still happen, I don't know, but it doesn't box us in to requiring it later.
This is a good point as well. Regards, -- Pierre

« previous php.internals (#115568) next »