On Wed, Oct 18, 2023 at 2:37 PM Pierre <pierre-...@processus.org> wrote:

> Le 18/10/2023 à 13:01, Alex Wells a écrit :
> >   The community has just now decided on the PHPDoc syntax for generics,
> has
> > just started widely adopting them in packages and has just got
> first-party
> > support from PHPStorm. I doubt that migrating to yet another temporary
> > solution (one that still doesn't address all of the concerns) is a good
> > idea right now.
>
> Documentation is not code, and you could have syntax errors within
> without ever knowing it. Documentation is documentation and static
> analysis based upon documentation is fragile. All static analyzers may
> not even be in phase, when you contribute to projects you have to learn
> code style and conventions, but you also have to learn documenting style
> and conventions, and you must add the fact that from one project to
> another, generics documentation convention changes. Even thought you
> think it's "community decided convention", not all tools are in sync,
> sadly, and not all the community is OK with it.
>

Agreed with everything. PHPDoc is and will always be a temporary solution,
there's no denying, and I'd much prefer a better solution from the PHP
itself - one's easier to use and parse. All I'm saying is that I don't
believe it's feasible to implement another temporary solution that doesn't
have too many benefits over what the community already has, especially
given PHP's very limited resources. That's why I'm advocating for either
fully type erased generics (with proper, somewhat stable syntax for years
to come) or nothing at all.

Reply via email to