Re: State of Generics and Collections
| From: | Roman Pronskiy | Date: | Fri, 23 Aug 2024 21:45:43 +0000 |
| Subject: | Re: State of Generics and Collections | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-125173@lists.php.net to get a copy of this message | ||
On Fri, Aug 23, 2024 at 4:31 PM Larry Garfield <larry@garfieldtech.com> wrote:
>
> The null option is always an option, yes. The thing to understand is that today, *we already
> have erased generics*, via PHPStan/Psalm. That's one reason I am, personally, against erased
> generics in the language proper. They don't really offer anything we don't have already.
> As for making docblock generics "official", one, as I noted I hate the current
> syntax. :-) Two, that seems unwise as long as PHP still has an option to remove comments/docblocks
> at compile time. Even if it's not used much anymore, the option is still there, AFAIK.
It seems you answered your own point here. Erased generics do bring
better syntax.
> And that's before we even run into the long-standing Internals aversion to even
> recognizing the existence of 3rd party tools for fear of "endorsing" anything. (With the
> inexplicable exception of Docuwiki.)
Are you referring to this page: https://wiki.php.net/wiki/dokuwiki? It
doesn’t appear to be an endorsement and could be removed easily.
Additionally, there are several third-party extensions documented on
php.net, such as Swoole, Ds, Yaf, etc., which are, in a way, endorsed
by their inclusion.