On Thu, 2 June 2016 Bob Weinand wrote:
> Hey all,
> 
> I know, it has been quite some time … but it's still well in time for 7.1.
> 
> Time to move on and put Union types to vote soon. [In the next 1-2 days]
> 
> We have done some changes to the RFC to emphasize the appeal of
> union types as well as clarified what exactly we will vote on.
> 
> If you have more feedback, it's welcome: https://wiki.php.net/rfc/union_types
> 
> Thanks,
> Bob

Thank you (and Levi) for this RFC! I can't vote, but I'd like to
weigh in with my userland perspective.

Just last week I was working with several functions that accept
array|Traversable and array|string parameters. Union types would
make it easier to document these functions, as well as eliminate the
boilerplate code currently required to validate their parameters.

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.

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

Reply via email to