> Am 02.06.2016 um 19:11 schrieb Andrea Faulds <a...@ajf.me>:
> 
> Hi Bob,
> 
> 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
> 
> I do wonder if 1-2 days is really sufficient time, given that before now, the 
> only announced RFC had been substantially less complete.
> 
> That aside, the behaviour the RFC now specifies for how weak typing interacts 
> with union types is frighteningly complicated. I don't see how it could be 
> anything other than that, but the new complexity this introduces to PHP is 
> enough for me to vote against this RFC, even ignoring my other concerns.
> 
> Thanks.
> -- 
> Andrea Faulds
> https://ajf.me/


Hey,

I think this is more of a presentation problem.
As you say, there's not much a better way to do that.

It's basically our weak casting rules, just applied to the most lossless type 
available.
It's out weak casting rules which are so complex; the RFCs combination is not 
particularly complex.
It needs to cover everything, but it's particularly important for the trivial 
cases to be handled here. Would be quite WTF if you could not pass a float to 
something accepting int (as one of its types).

I'd welcome every suggestion to make the rules look less scary, because they 
actually aren't.

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

Reply via email to