Re: [PHP-DEV] [RFC] Typed array declarations
[email protected] (Matheus Martins) Tue, 21 Jul 2026 23:04:11 +0200
| Newsgroups | php.internals |
|---|---|
| Message-ID | <CAAZKEqjZbjn_KZa314sFmYJVvx6P22WM=dju7ux_GWqxT4D9+Q@mail.gmail.com> |
> My largest concern is that this proposal substantially overlaps with the = reified generics RFC, which is being held until after the current code free= ze in late August or early September at the earliest. > > In particular, both proposals need to answer many of the same questions a= round parameterized types, variance, Reflection, runtime enforcement, infer= ence, and type identity. I think we should avoid committing PHP to a separa= te set of array-specific rules before the broader generics proposal has bee= n discussed. Otherwise, we risk either constraining the generics design or = ending up with two parameterization models that behave differently. plus: we may need to use turbofish syntax like `array::<int, Product>` to avoid issues with the parser.