Re: [RFC] [PRE-VOTE] Union types
| From: | Fleshgrinder | Date: | Fri, 03 Jun 2016 17:56:47 +0000 |
| Subject: | Re: [RFC] [PRE-VOTE] Union types | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93757@lists.php.net to get a copy of this message | ||
On 6/3/2016 3:40 PM, Theodore Brown wrote:
> I am also in favor of the proposal to replace ?QuestionMarkNullables
> with union|null. Having a single way to declare nullable types will
> keep the reflection API simpler, make things easier for static
> analysis tools, and prevent developers from having to wonder which
> syntax they should use for a given function. This would be a big win
> for language consistency, and this is probably our only chance to
> make the change without breaking BC.
>
I am actually only in favor of disallowing ?T1|T2 in favor of T1|T2|null
but not ?T because it's shorter and I do not see a problem with that.
--
Richard "Fleshgrinder" Fussenegger
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc