Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is a standard needed? #2

Open
DaveLiddament opened this issue Jan 8, 2021 · 1 comment
Open

Is a standard needed? #2

DaveLiddament opened this issue Jan 8, 2021 · 1 comment

Comments

@DaveLiddament
Copy link
Owner

Reasons for formalising a standard

  1. It might increase uptake. The lack of a standard is the reason cited in PHPStorm's 2020.3 release announcement for not fully supporting @template:

We believe that support for generics is an advanced feature that lacks a proper specification and has many edge cases. Yet, we have decided to implement basic support for the @template construct based on the Psalm syntax, to see how it goes.

  1. Library and framework maintainers might be happier to have the generics annotations in their code if there was a standard.

Reasons for aborting this project

  1. Some libraries already support generics, so clearly a formal standard is not needed.
  2. Those who want the power of generics have it already. If they make use of a library that doesn't have the generics annotations then stubs and plugins exist, or can be written, to provide support with static analysers
  3. A lot of work!
@DaveLiddament
Copy link
Owner Author

Another reason against is that PhpStorm does support use of PHPStan and Psalm.

This might be good enough for the majority of developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant