Re: intersection types and null for defaults, properties and return types

From: Date: Tue, 20 Jul 2021 09:43:51 +0000
Subject: Re: intersection types and null for defaults, properties and return types
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-115516@lists.php.net to get a copy of this message
I agree completely with George P. Banyard, these changes don’t seem very well though-out. Pure intersection types are fine as accepted by the RFC. Both ?A&B and (A&B)|null are confusing and would create holes in the type system yet to be filled (but users would definitely try to use them which would only lead to confusion and disappointment). Ondřej Mirtes

« previous php.internals (#115516) next »