Re: [PHP-DEV] [RFC] Typed array declarations
[email protected] (Wendell Adriel) Wed, 22 Jul 2026 12:03:15 +0100
| Newsgroups | php.internals |
|---|---|
| Message-ID | <CA+1VZ8tusuy39cZLpuc==XF0xAG7h2fPCxCUFFHJJbKLuG6zHg@mail.gmail.com> |
--000000000000bbf1cd06573116d6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey there Matheus, plus: we may need to use turbofish syntax like `array::<int, Product>` > to avoid issues with the parser. I didn't dive too much, but I don't think it's needed and we could make the array syntax work like proposed in the RFC. I don=E2=80=99t know where this fear comes from. I have monomorphized gener= ics > implemented in a branch already using the standard C<T> syntax and it wor= ks > great. Combined with the struct proposal I also am sitting on until 8.6 i= s > finalized, they combine to form strongly-typed value-type data structures= . Exactly, I think this is very much doable, and since you already have a working branch with that working shows that it is, thanks Holly. *---* *Best Regards,* *Wendell Adriel.* *Software Engineer & Architect* *https://wendelladriel.com <https://wendelladriel.com>* Em qua., 22 de jul. de 2026 =C3=A0s 04:19, Holly Schilling < [email protected]> escreveu: > > > plus: we may need to use turbofish syntax like `array::<int, Product>` > > to avoid issues with the parser. > > I don=E2=80=99t know where this fear comes from. I have monomorphized gen= erics > implemented in a branch already using the standard C<T> syntax and it wor= ks > great. Combined with the struct proposal I also am sitting on until 8.6 i= s > finalized, they combine to form strongly-typed value-type data structures= . --000000000000bbf1cd06573116d6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div class=3D"gmail_default" style=3D"font-family:ari= al,sans-serif;font-size:small;color:rgb(0,0,0)">Hey there Matheus,</div><di= v class=3D"gmail_default" style=3D"font-family:arial,sans-serif;font-size:s= mall;color:rgb(0,0,0)"><br></div><blockquote style=3D"margin:0px 0px 0px 0.= 8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class=3D"gmail= _quote"><span style=3D"color:rgb(34,34,34);font-family:Arial,Helvetica,sans= -serif"><span class=3D"gmail_default" style=3D"font-family:arial,sans-serif= ;font-size:small;color:rgb(0,0,0)"></span>plus: we may need to use turbofis= h syntax like `array::<int, Product>`<br></span><span style=3D"color:= rgb(34,34,34);font-family:Arial,Helvetica,sans-serif">to avoid issues with = the parser.</span></blockquote><br clear=3D"all"></div><div><div class=3D"g= mail_default" style=3D"font-family:arial,sans-serif;font-size:small;color:r= gb(0,0,0)">I didn't dive too much, but I don't think it's neede= d and we could make the array syntax work like proposed in the RFC.</div><d= iv class=3D"gmail_default" style=3D"font-family:arial,sans-serif;font-size:= small;color:rgb(0,0,0)"><br></div><blockquote style=3D"margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class=3D"gmai= l_quote"><span class=3D"gmail_default" style=3D"font-family:arial,sans-seri= f;font-size:small;color:rgb(0,0,0)"></span>I don=E2=80=99t know where this = fear comes from. I have <span aria-invalid=3D"spelling" class=3D"LI ng" sty= le=3D"border-style:none;background:none">monomorphized</span> <span aria-in= valid=3D"grammar" class=3D"Lm ng" style=3D"border-style:none;background:non= e">generics</span> implemented in a branch already using the standard C<= T> syntax and it works great. Combined with the struct proposal I also a= m sitting on until 8.6 is finalized, they combine to form strongly-typed va= lue-type data structures.</blockquote><br></div><div><div class=3D"gmail_de= fault" style=3D"font-family:arial,sans-serif;font-size:small;color:rgb(0,0,= 0)">Exactly, I think this is very much doable, and since you already have a= working=C2=A0branch with that working shows that it is, thanks Holly.</div= ><br></div><div><br></div><div><div dir=3D"ltr" class=3D"gmail_signature" d= ata-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div dir=3D"ltr"><div di= r=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"lt= r"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div= dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><b><span st= yle=3D"font-family:verdana,sans-serif"><span style=3D"font-size:13.3333px">= ---</span></span></b><span style=3D"font-family:verdana,sans-serif"><span s= tyle=3D"font-size:13.3333px"><br></span></span></div><div dir=3D"ltr"><b><s= pan style=3D"font-family:verdana,sans-serif"><span style=3D"font-size:13.33= 33px">Best Regards,</span></span></b><br></div><div><b><span style=3D"font-= family:verdana,sans-serif"><span style=3D"font-size:13.3333px">Wendell Adri= el.</span></span></b></div><div><b style=3D"font-family:verdana,sans-serif;= font-size:13.3333px">Software Engineer & Architect</b><b><span style=3D= "font-family:verdana,sans-serif"><span style=3D"font-size:13.3333px"><br></= span></span></b></div><div><b><span style=3D"font-family:verdana,sans-serif= "><span style=3D"font-size:13.3333px"><span style=3D"color:rgb(255,127,0)">= <a href=3D"https://wendelladriel.com" target=3D"_blank">https://wendelladri= el.com</a></span></span></span></b></div></div></div></div></div></div></di= v></div></div></div></div></div></div></div></div></div></div><br></div><br= ><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D= "gmail_attr">Em qua., 22 de jul. de 2026 =C3=A0s 04:19, Holly Schilling <= ;<a href=3D"mailto:[email protected]">holly.a.schilling@outlook= .com</a>> escreveu:<br></div><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex"><br> > plus: we may need to use turbofish syntax like `array::<int, Produc= t>`<br> > to avoid issues with the parser.<br> <br> I don=E2=80=99t know where this fear comes from. I have monomorphized gener= ics implemented in a branch already using the standard C<T> syntax an= d it works great. Combined with the struct proposal I also am sitting on un= til 8.6 is finalized, they combine to form strongly-typed value-type data s= tructures. </blockquote></div> --000000000000bbf1cd06573116d6--