On 23/07/2021 10:58, Nicolas Grekas wrote:
Hi everyone,
I wrote everything down about the reasons why here:
https://wiki.php.net/rfc/nullable_intersection_types
IMO we should require brackets and forbid not using them when combining
unions and intersections.
These types are already going
Hi everyone,
as proposed by Nikita and Joe, I'm submitting this late RFC for your
consideration for inclusion in PHP 8.1. Intersection types as currently
accepted are not nullable. This RFC proposes to make them so.
I wrote everything down about the reasons why here:
On Fri, Jul 23, 2021 at 11:58 AM Nicolas Grekas
wrote:
> Hi everyone,
>
> as proposed by Nikita and Joe, I'm submitting this late RFC for your
> consideration for inclusion in PHP 8.1. Intersection types as currently
> accepted are not nullable. This RFC proposes to make them so.
>
> I wrote
> As you note in the RFC, PHP already defines `|` as having a lower
> precedence than `&`, so `X & Y | null` can only be interpreted as
> `(X & Y) | null`. This is consistent with other languages such as
> TypeScript, where `A & B | C & D` is parsed as `(A & B) | (C & D)`.
> [2]
>
> Since
On Fri, Jul 23, 2021 at 4:31 PM Deleu wrote:
> On Fri, Jul 23, 2021 at 2:36 PM Derick Rethans wrote:
>
> > From the RFC: «Taking all these elements into account, the preference
> > of... and thus to use the "?X" syntax».
> >
> > I think this would be a mistake. You touch upon operator
On Friday, July 23, 2021 at 4:58 AM Nicolas Grekas
wrote:
> Hi everyone,
>
> as proposed by Nikita and Joe, I'm submitting this late RFC for your
> consideration for inclusion in PHP 8.1. Intersection types as currently
> accepted are not nullable. This RFC proposes to make them so.
>
> I wrote
Le 23/07/2021 à 17:56, Levi Morrison via internals a écrit :
As you note in the RFC, PHP already defines `|` as having a lower
precedence than `&`, so `X & Y | null` can only be interpreted as
`(X & Y) | null`. This is consistent with other languages such as
TypeScript, where `A & B | C & D` is
On Fri, 23 Jul 2021, Nicolas Grekas wrote:
> as proposed by Nikita and Joe, I'm submitting this late RFC for your
> consideration for inclusion in PHP 8.1. Intersection types as
> currently accepted are not nullable. This RFC proposes to make them
> so.
>
> I wrote everything down about the
On Fri, Jul 23, 2021 at 2:36 PM Derick Rethans wrote:
> From the RFC: «Taking all these elements into account, the preference
> of... and thus to use the "?X" syntax».
>
> I think this would be a mistake. You touch upon operator precedence, and
> needing to know whether | or & is higher, and
On Fri, Jul 23, 2021, at 11:06 AM, Pierre wrote:
> Le 23/07/2021 à 17:56, Levi Morrison via internals a écrit :
> >> As you note in the RFC, PHP already defines `|` as having a lower
> >> precedence than `&`, so `X & Y | null` can only be interpreted as
> >> `(X & Y) | null`. This is consistent
On Fri, Jul 23, 2021 at 12:55 PM Mark Randall wrote:
> On 23/07/2021 10:58, Nicolas Grekas wrote:
> > Hi everyone,
> > I wrote everything down about the reasons why here:
> > https://wiki.php.net/rfc/nullable_intersection_types
>
>
> IMO we should require brackets and forbid not using them when
> > as proposed by Nikita and Joe, I'm submitting this late RFC for your
> > consideration for inclusion in PHP 8.1. Intersection types as
> > currently accepted are not nullable. This RFC proposes to make them
> > so.
> >
> > I wrote everything down about the reasons why here:
> >
Le ven. 23 juil. 2021 à 13:05, Guilliam Xavier
a écrit :
>
> On Fri, Jul 23, 2021 at 11:58 AM Nicolas Grekas
> wrote:
>
>> Hi everyone,
>>
>> as proposed by Nikita and Joe, I'm submitting this late RFC for your
>> consideration for inclusion in PHP 8.1. Intersection types as currently
>>
On Fri, Jul 23, 2021 at 6:37 AM Derick Rethans wrote:
>
> From the RFC: «Taking all these elements into account, the preference
> of... and thus to use the "?X" syntax».
>
> I think this would be a mistake. You touch upon operator precedence, and
> needing to know whether | or & is higher, and
Le 23/07/2021 à 18:25, Larry Garfield a écrit :
Requiring parenthesis now leaves the option open in the future to make them
optional when doing full mixed types.
Making them optional now requires that they be optional in the future when
doing full mixed types.
I vaguely recall there being
>> @Larry makes an argument to keep them:
>>
>>> Requiring parenthesis now leaves the option open in the future to make them
>>> optional when doing full mixed types.
>>
>>
>> I don’t understand why we should require something that is not needed simply
>> because it would give us an option
> On Jul 20, 2021, at 3:44 AM, Lynn wrote:
>
> On Tue, Jul 20, 2021 at 9:33 AM Peter Bowyer
> wrote:
>
>> I have now been contacted by 2 people who tried multiple times to join this
>> mailing list and cannot.
>>
>> It took me 5 weeks for my signup to work. During that time I emailed the
>>
> On Jul 24, 2021, at 12:42 AM, Tobias Nyholm wrote:
>
>> It seems this RFC is actually trying to accomplish two(2) things:
>>
>> 1. Add typehints for nullable intersection types to PHP.
>> 2. Get PHP to support a preferred syntax for type-hinting nullable
>> intersection types.
>
> Yes of
> It seems this RFC is actually trying to accomplish two(2) things:
>
> 1. Add typehints for nullable intersection types to PHP.
> 2. Get PHP to support a preferred syntax for type-hinting nullable
> intersection types.
Yes of course. You cannot really do #1 without #2.
I agree with Nicolas
> On Jul 23, 2021, at 5:58 AM, Nicolas Grekas wrote:
>
> Hi everyone,
>
> as proposed by Nikita and Joe, I'm submitting this late RFC for your
> consideration for inclusion in PHP 8.1. Intersection types as currently
> accepted are not nullable. This RFC proposes to make them so.
>
> I wrote
20 matches
Mail list logo