Re:PHP compile time generics: yay or nay?
by jasone on Sunday August 10, 2025 @08:19PM
(#44859653)
The former merely exposes a `BlogPostRepository` class. The latter requires some mechanism for creating a generic object of concrete type, which is a lot bigger change to the implementation. Does each parametrized generic type have its own implementation? Or does each object have sufficient RTTI to dynamically dispatch? And what are the implications for module API data structures? Etc. In other words, this limitation avoids tremendously disruptive implementation impacts. Not pretty, but we're talking PHP here anyway. ;-)
[ Parent
| on HN ]
There are no comments on this comment yet.