I am looking forward to Prop-hooks. I am also a C# developer and a PHP dev; I use them daily within my C# application. I think PHP will benefit a lot from them!
After seeing huge e-mails from voters on the internals list just before the voting period started, I was afraid this RFC would not pass. But I'm happy to be wrong on this. =) Thank you, Larry and Illija!
Larry was gracious to speak at our Toronto PHP meet-up on June 06th. The idea for our invitation was the two Property Hooks videos PHP Annotated did. I am linking to our video for reference as they relate. Regards from Toronto! ruclips.net/video/kZ02hWKHALM/видео.html
Probably what it will take to improve the RFC is a sufficiently large group or organisation forking PHP, and implementing some RFCs that didn’t make it but a large group of people want (in a backwards-compatible way). When enough people start switching to this fork, the PHP maintainers will either start getting their shit together, or PHP will simply bleed dry.
@@LarryGarfieldCrell That’s true, although iirc HHVM never was fully compatible with PHP, which is why Hack exists as a separate dialect of PHP. The times and goals then were also different. Facebook was focussed on performance, not adding features. I maintain that, in the modern programming language landscape, if a well-supported, 100% compatible fork of PHP were to implement stuff like generics, people would be much more likely to hop on board. Of course, it would require the backing of a dedicated team and a large company to really make it work. And there is little financial incentive to go ahead and fork PHP out of nowhere when Typescript exists. So it’s very unlikely it will happen.
I don't care about anything like this until we get generics. Psalm's entire type system needs to be native but generics alone is so far and above any second priority it's the only thing we should be discussing.
It's not an Either/Or. Generics in PHP are very very hard. Very smart people have been working on it on and off, and just figuring out a performant implementation is a challenge. I'm confident if it could be done, the RFC would pass with even more support than hooks did. But that's above Ilija and my capabilites, so we work on what we can. If you'd like to contribute a good generics implementation, that would be fantastic.
Saying that you don't care about anything until there are generics is immature. It's like you don't care about the goods you have in your life until you don't get Ferrari car. Of course generics would be a very good addition to the language but you can achieve a lot with static analyzer like Psalm or PHPStan and classes marked as generic in PHPDoc.
> PHP is a very different language to what it was 20 years ago, and that is a good thing Nope. It has interesting patterns, but is fundamentally worse than most other ecosystems. Having got worse for at least the past 10 years.
I think you must be living in some alternative reality. 10 years ago PHP was crap. Today it's really nice and it's quality is accelerating exponentially. Also PHP Foundation is only 2 years old and I'm exited to see where it will be in 5 or 10 years. The tooling around language is also very good and will get even better.
I am looking forward to Prop-hooks. I am also a C# developer and a PHP dev; I use them daily within my C# application. I think PHP will benefit a lot from them!
After seeing huge e-mails from voters on the internals list just before the voting period started, I was afraid this RFC would not pass. But I'm happy to be wrong on this. =)
Thank you, Larry and Illija!
Larry was gracious to speak at our Toronto PHP meet-up on June 06th. The idea for our invitation was the two Property Hooks videos PHP Annotated did. I am linking to our video for reference as they relate. Regards from Toronto!
ruclips.net/video/kZ02hWKHALM/видео.html
Congrats on the release. Looking forward to the pattern matching rfc maybe next year?
I've been using full public props on entity since they are typed and nullable. Doctrine deals with it just fine.
Probably what it will take to improve the RFC is a sufficiently large group or organisation forking PHP, and implementing some RFCs that didn’t make it but a large group of people want (in a backwards-compatible way).
When enough people start switching to this fork, the PHP maintainers will either start getting their shit together, or PHP will simply bleed dry.
I mean, just imagine big company X forks PHP and implements Generics. I'd be very tempted to jump ship myself.
HHVM/Hack did that already. Nobody used it but Facebook and Slack. It's now incompatible with current PHP.
@@LarryGarfieldCrell That’s true, although iirc HHVM never was fully compatible with PHP, which is why Hack exists as a separate dialect of PHP.
The times and goals then were also different. Facebook was focussed on performance, not adding features.
I maintain that, in the modern programming language landscape, if a well-supported, 100% compatible fork of PHP were to implement stuff like generics, people would be much more likely to hop on board.
Of course, it would require the backing of a dedicated team and a large company to really make it work. And there is little financial incentive to go ahead and fork PHP out of nowhere when Typescript exists. So it’s very unlikely it will happen.
I want better functional-programming in php.
I don't care about anything like this until we get generics. Psalm's entire type system needs to be native but generics alone is so far and above any second priority it's the only thing we should be discussing.
Generics would be so awesome. 😢😢😢😢
It's not an Either/Or. Generics in PHP are very very hard. Very smart people have been working on it on and off, and just figuring out a performant implementation is a challenge. I'm confident if it could be done, the RFC would pass with even more support than hooks did. But that's above Ilija and my capabilites, so we work on what we can.
If you'd like to contribute a good generics implementation, that would be fantastic.
For now use comments for generics
Saying that you don't care about anything until there are generics is immature. It's like you don't care about the goods you have in your life until you don't get Ferrari car. Of course generics would be a very good addition to the language but you can achieve a lot with static analyzer like Psalm or PHPStan and classes marked as generic in PHPDoc.
> PHP is a very different language to what it was 20 years ago, and that is a good thing
Nope. It has interesting patterns, but is fundamentally worse than most other ecosystems. Having got worse for at least the past 10 years.
I think you must be living in some alternative reality. 10 years ago PHP was crap. Today it's really nice and it's quality is accelerating exponentially. Also PHP Foundation is only 2 years old and I'm exited to see where it will be in 5 or 10 years. The tooling around language is also very good and will get even better.