Skip to content

Commit e258a55

Browse files
authored
Clarify contributors authors of the idea in Generics post (#231)
* Clarify contributors authors of the idea in Generics post * Update one more paragraph
1 parent cc8c3d3 commit e258a55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/_posts/2025-08-05-compile-generics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ published_at: 04 August 2025
1313

1414
One of the most sought-after features for PHP is Generics: The ability to have a type that takes another type as a parameter. It's a feature found in most compiled languages by now, but implementing generics in an interpreted language like PHP, where all the type checking would have to be done at runtime, has always proven Really Really Hard(tm), Really Really Slow(tm), or both.
1515

16-
But, experimentation by the PHP Foundation's dev team suggests we may be able to get 80% of the benefit for 20% of the work. Is that enough?
16+
But, experimentation by Gina from the PHP Foundation's dev team suggests we may be able to get 80% of the benefit for 20% of the work. Is that enough?
1717

1818
## The short, short version
1919

20-
We believe it's possible to implement generics on only interfaces and abstract classes, which would offer a large chunk of the benefit of generics but avoid most of the pitfalls.
20+
Gina and Larry believe it's possible to implement generics on only interfaces and abstract classes, which would offer a large chunk of the benefit of generics but avoid most of the pitfalls.
2121

2222
In particular, interfaces and abstract classes could declare that they need one or more types specified:
2323

@@ -365,7 +365,7 @@ This work is still experimental. As noted above, there's a few additional featu
365365

366366
The Foundation, of course, wants to be respectful of the time of our development team, the time of the many RFC reviewers, and the pocketbooks of our generous sponsors. Foundation staff have already sunk quite a bit of time into the question of generics. Before we sink more time into it, we want to ask the community (and PHP Internals especially)... Is it worth it?
367367

368-
Would a partial-generics approach like that described here be acceptable? Even if it may not be possible to go all the way to full generics, would "compile time-only generics" be a big enough win to justify spending more time on it? Our team thinks it is, but PHP is larger than our team, so we want to get feedback from the broader community.
368+
Would a partial-generics approach like that described here be acceptable? Even if it may not be possible to go all the way to full generics, would "compile time-only generics" be a big enough win to justify spending more time on it? Gina from The PHP Foundation team thinks it is, but PHP is larger than just our team, so we want to get feedback from the broader community.
369369

370370
**Would you support (and vote in favor of) compile-time-only generics as described here?**
371371

0 commit comments

Comments
 (0)