On Tue, 2 Jun 2026 at 16:13, Gina P. Banyard <[email protected]> wrote:
> On Sunday, 10 May 2026 at 21:05, Seifeddine Gmati <[email protected]> > wrote: > > Hello Internals, > > > > I'd like to start the discussion on a new RFC adding bound-erased > > generics types to PHP. > > > > Generic type parameters can be declared on classes, interfaces, > > traits, functions, methods, closures, and arrow functions, with > > bounds, defaults, and variance markers. Type parameters erase to their > > bound at runtime; the pre-erasure form is preserved for Reflection and > > consumed by static analyzers. > > > > - RFC: https://wiki.php.net/rfc/bound_erased_generic_types > > - Implementation: https://github.com/php/php-src/pull/21969 > > As you already know from off list discussion I will vote against this RFC. > I've laid my arguments in a blog post on my website. [1] > > The only thing I take offence to is saying my attempt/proposal has stalled. > Me not actively working on it 24/7 doesn't mean it stalled, and I had > started working on it earlier in the year before this RFC landed, or I was > aware you were working on something. > > Best regards, > > Gina P. Banyard > > [1] https://gpb.moe/blog/opinion-bound-erased-generics.html Hi Gina, Thanks for the blog post. Even though we'll disagree on the conclusion, the arguments are well-laid-out and worth engaging with on their merits. Matt and Ondřej have responded to most of the substantive points already, and I'd echo what they said. One small clarification on the "stalled" language: I didn't mean (and didn't intend to imply) anything about the people doing the work, or the effort they were putting in. I'm well aware that everyone working on this is doing it on top of other commitments, and progress at the pace people can sustain is the only realistic pace there is. What I meant by "stalled" was specifically the public RFC process: the 2016 RFC remained in Draft, no implementation reached a vote, and the 2024 work continued but didn't produce a filed RFC. That's a statement about the procedural milestones, not the engineering work or the people doing it. I should have phrased it more precisely. Apologies for the imprecision. I appreciate the work you have been doing on compile-time generics for class-likes, and the RFC's Future Scope section explicitly notes that the two approaches compose. Whatever this RFC's outcome, that work continues to be valuable. Cheers, Seifeddine.
