Re: Typed array properties V2
| From: | Mike Schinkel | Date: | Mon, 20 Jan 2020 02:30:07 +0000 |
| Subject: | Re: Typed array properties V2 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108202@lists.php.net to get a copy of this message | ||
> On Jan 19, 2020, at 8:42 PM, John Bafford <jbafford@zort.net> 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.
That syntax was what someone suggested on the prior discussion. I personally dislike it because I
have used PHPDoc syntax of
type[] for so long and would rather see us stick with that.
But if I'm honest about it, debate over syntax is probably just bikeshedding at this point.
The more important question IMO is, can we actually implement typed arrays to enough voter's
satisfaction and w/o a significant performance penalty?
-Mike