php-generics-rfc
Mirror of https://wiki.php.net/rfc/generics for easier collaboration (by PHPGenerics)
RfcCodex
Notes on PHP RFCs, and topics that occur repeatedly on PHP internals (by Danack)
php-generics-rfc | RfcCodex | |
---|---|---|
13 | 5 | |
185 | 206 | |
2.2% | - | |
0.0 | 5.0 | |
almost 6 years ago | 11 months ago | |
- | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
php-generics-rfc
Posts with mentions or reviews of php-generics-rfc.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-01.
-
What I always dreamed of PHP 😎 (IMPORTANT!)
About generics: it's very hard.
-
Generics via Attributes in PHP — Can We Have Them?
Nikita wrote a good summary about the topic and, even if we go with type erased, there still the syntax problem to solve.
-
Comparing PHP Collections
Ok) I wrote at the very beginning of the post which collections I will compare. There you can find links to the generics library. I will be very happy when the PHP IDE add support of generics, but the PHP community hasn't decided what the syntax will be. If you can help with this please let me know.
-
TypeScript is working on a proposal to add built-in types in JS that are ignored at runtime. This is exactly what PHP should do as well.
Nikic did a POC about generics a couple years ago and raised some concerns. The first one was performance, if types were to be validated on runtime, and the other was (as always in PHP...) syntax ambiguities, wich could require to use a new parser.
-
Generics implementation approaches
This approach has a small performance/memory effect. Nikita Popov already had an attempt to implement this type of generics in PHP.
-
PHP Generics. Right here. Right now
Doesn't support generic syntax because of RFC is not complete yet.
-
Hows the generics discussion going?
I was reading some stuff and found some discussion going here: https://github.com/PHPGenerics/php-generics-rfc/issues/45
-
Weekly "ask anything" thread
I assume familiarising yourself on the existing discussions on GitHub and the internals mailing list would be a start to understand what the issue with implementing them is, and why the delay for a real implementation. Nikita made some useful notes here: https://github.com/PHPGenerics/php-generics-rfc/issues/45
-
Type-constrained elements collection in PHP ?
These are called generics. PHP currently doesn't support them, but there is work being done towards them being added. There are a lot of complications that need to be figured out before they can be implemented. See https://github.com/PHPGenerics/php-generics-rfc/issues and https://github.com/Danack/RfcCodex/blob/master/generics.md.
RfcCodex
Posts with mentions or reviews of RfcCodex.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-11-23.
-
What is your #1 PHP feature request
Dan Ackroyd's RFC Codex has some good write-ups on commonly requested features.
-
Should PHP9 standardize naming conventions throughout the language?
My notes on Standardise core library functions.
-
Simple RFC ideas that could make it into PHP 8.1?
Also: https://github.com/Danack/RfcCodex/blob/master/method_overloading.md
-
Type-constrained elements collection in PHP ?
These are called generics. PHP currently doesn't support them, but there is work being done towards them being added. There are a lot of complications that need to be figured out before they can be implemented. See https://github.com/PHPGenerics/php-generics-rfc/issues and https://github.com/Danack/RfcCodex/blob/master/generics.md.
-
Maintainer of Swoole about the Fibers RFC: "I am afraid that fiber can only be used in the amphp framework and is of no value to other php projects."
And it's one of the reasons I think the rule "Don't volunteer other people for huge amounts of work" is appropriate.
What are some alternatives?
When comparing php-generics-rfc and RfcCodex you can also consider the following projects:
php-generics - PHP generics written in PHP
scalar_objects - Extension that adds support for method calls on primitive types in PHP
php-strict-array - Generator of strict arrays (vector, map)
react-fiber - ReactPHP + ext-fiber
php-src - The PHP Interpreter
pecl-php-operator - Operator overloading for Objects
varexporter - A powerful alternative to var_export(), which can export closures and objects without __set_state()
LazyIter - Lazy array function chains library for PHP inspired in Rust
php-docker - Docker Official Image packaging for PHP
you-are-using-it-wrong - :oncoming_police_car: Type check enforcement for library authors: enforces type-safety downstream
parallel - A succinct parallel concurrency API for PHP8
php-generics-rfc vs php-generics
RfcCodex vs scalar_objects
php-generics-rfc vs php-strict-array
RfcCodex vs react-fiber
php-generics-rfc vs php-src
RfcCodex vs pecl-php-operator
php-generics-rfc vs scalar_objects
RfcCodex vs varexporter
php-generics-rfc vs LazyIter
RfcCodex vs php-docker
php-generics-rfc vs you-are-using-it-wrong
RfcCodex vs parallel