Re: [RFC] Typed array declarations
| From: | Holly Schilling | Date: | Wed, 22 Jul 2026 14:05:33 +0000 |
| Subject: | Re: [RFC] Typed array declarations | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-132078@lists.php.net to get a copy of this message | ||
> Base types would likely resolve the "value object" problem for lists: They would (I
> think) naturally pass like arrays, not like objects. However, it's fairly clear that we want
> to have methods on collection objects, not just free-floating functions, so if they're
> implemented as their own types then we would *need* to have extension functions for them to support
> a more robust standard library for them. If implemented as objects, we could use built-in methods
> or extension functions, but then we have to deal with the passing semantics problem.
We could save a lot of conversations if everyone just agreed that my Roadmap for 9.0 with
implementations for Monomorphized Generics, Structs, Modules, Extensions, and Surfaces could be
considered accepted as a rough outline for the future. PHP needs meaningful growth to avoid settling
back into a 5.x slumber.
For anyone who hasn’t checked it out yet, I would encourage you to do so at https://EventuallyWrong.com/php9. I update it regularly
as I expand my proposals. Most recently I added Generics. Variadic Generics will probably be added
today as well.