Hey,
It has been long enough under discussion...
I've put union types into vote.
Please find the RFC located at:
https://wiki.php.net/rfc/union_types https://wiki.php.net/rfc/union_types
The vote is open until the 23th.
Thanks for voting,
Bob
It has been long enough under discussion... I've put union types into
vote.Please find the RFC located at:
https://wiki.php.net/rfc/union_types https://wiki.php.net/rfc/union_types
Not clear on some of the wording. When you say:
"This RFC proposes a vote on whether ?Foo shall be replaced by Foo |
null in general."
Do you mean that ?Foo will no longer be allowed at all if this RFCs
passes?
cheers,
Derick
Not clear on some of the wording. When you say:
"This RFC proposes a vote on whether ?Foo shall be replaced by Foo |
null in general."Do you mean that ?Foo will no longer be allowed at all if this RFCs
passes?cheers,
Derick
Same question here, since https://wiki.php.net/rfc/nullable_types
already passed and directly voiding it makes no sense.
I mentioned this before but maybe it is better to change the RFC to
disallow the question mark if an union type is in use:
OK
?string
null|string
string|null
?SomeClass
SomeClass|SomeOtherClass|null
null|SomeClass|SomeOtherClass
SomeClass|null|SomeOtherClass
BAD
?SomeClass|SomeOtherClass
?SomeOtherClass|SomeClass
?string|int
?int|string
This would be a perfectly valid and reasonable restriction that makes
sense in every way because it helps to avoid ambiguity. However,
disallowing ?T is not.
--
Richard "Fleshgrinder" Fussenegger
Am 14.06.2016 um 18:09 schrieb Fleshgrinder php@fleshgrinder.com:
Not clear on some of the wording. When you say:
"This RFC proposes a vote on whether ?Foo shall be replaced by Foo |
null in general."Do you mean that ?Foo will no longer be allowed at all if this RFCs
passes?cheers,
DerickSame question here, since https://wiki.php.net/rfc/nullable_types
already passed and directly voiding it makes no sense.I mentioned this before but maybe it is better to change the RFC to
disallow the question mark if an union type is in use:OK
?string
null|string
string|null?SomeClass
SomeClass|SomeOtherClass|null
null|SomeClass|SomeOtherClass
SomeClass|null|SomeOtherClassBAD
?SomeClass|SomeOtherClass
?SomeOtherClass|SomeClass?string|int
?int|stringThis would be a perfectly valid and reasonable restriction that makes
sense in every way because it helps to avoid ambiguity. However,
disallowing ?T is not.--
Richard "Fleshgrinder" Fussenegger
These last ones (which you describe as "BAD" are anyway disallowed.
The separate vote is to remove ?string by string | null as only option.
(It basically just preserves the concept of nullability, but reverses the decision to use a trailing ?. This vote is in order to give those who prefer only foo | null instead of ?foo a chance to voice their opinion.)
Bob
Hi!
The separate vote is to remove ?string by string | null as only option.
So we just held a vote on introducing ?type a month ago, to now vote on
removing it. Am I the only one to whom it doesn't make a lot of sense?
--
Stas Malyshev
smalyshev@gmail.com
So we just held a vote on introducing ?type a month ago, to now vote on
removing it. Am I the only one to whom it doesn't make a lot of sense?
Exactly what I question too especially because the other vote was so
overwhelmingly positive.
--
Richard "Fleshgrinder" Fussenegger
Am 14.06.2016 um 20:35 schrieb Fleshgrinder php@fleshgrinder.com:
So we just held a vote on introducing ?type a month ago, to now vote on
removing it. Am I the only one to whom it doesn't make a lot of sense?Exactly what I question too especially because the other vote was so
overwhelmingly positive.
If we'd voted first on unions (and had a separate vote whether to allow null as type), I'm sure the vote would have been just as positive and the nullables RFC not appeared at all.
I'm personally guessing that people mainly wanted to see nullability at all rather than the specific "?" syntax.
Thus there's a separate vote...
Bob
Am 14.06.2016 um 17:22 schrieb Derick Rethans derick@php.net:
It has been long enough under discussion... I've put union types into
vote.Please find the RFC located at:
https://wiki.php.net/rfc/union_types https://wiki.php.net/rfc/union_typesNot clear on some of the wording. When you say:
"This RFC proposes a vote on whether ?Foo shall be replaced by Foo |
null in general."Do you mean that ?Foo will no longer be allowed at all if this RFCs
passes?cheers,
Derick
Correct. I think there should be only one way to do that; others may disagree, hence it is a separate vote.
Bob