> On Jan 19, 2020, at 8:42 PM, John Bafford wrote:
> As a thought, perhaps the syntax '[Type]' for an array of Type. That way, you
> could write ?[int], or [?int], or even ?[?int] and there would be no
> ambiguity, and no need for parentheses since the array brackets would serve
> that purpose.
> On Jan 19, 2020, at 19:53, Mike Schinkel wrote:
>
> P.S. There was also the mention by Levi Morrison that the type[] syntax was
> a poor one because of ambiguity between (?int)[] or ?(int[]). I would argue
> that the latter would likely occur orders of magnitude more often than the
> fo
Hi Nikita,
> On Jan 18, 2020, at 5:05 AM, Nikita Popov wrote:
> Did you read through the previous discussions on this topic?
> https://externals.io/message/100946 in particular comes to mind.
Thanks for this link. It was very insightful.
> The primary concern about the previous typed array prop
On Fri, Jan 17, 2020 at 11:59 AM Nikita Popov wrote:
>> I've created https://github.com/php/php-src/pull/5067 to make code like
>>function test($foo = null, $bar) {}
>> throw a warning
>
> I was interested in seeing how prevalent this pattern, is, so I ran
> some analysis on the top 2k compos
Hi Nikita,
Nikita Popov wrote:
Since nullable types have been available since PHP 7.1, having a required
parameter after an optional one is increasingly likely a bug rather than an
intentional workaround, so I think it would be good to throw a warning for
this case.
Wouldn't it be trivial to s