Let's talk about property hooks!

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024

Комментарии • 18

  • @dannybolick4783
    @dannybolick4783 5 месяцев назад +6

    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!

  • @erickdeazevedolima1763
    @erickdeazevedolima1763 5 месяцев назад +2

    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!

  • @BobBloom
    @BobBloom 3 месяца назад

    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

  • @TheRafark
    @TheRafark 5 месяцев назад

    Congrats on the release. Looking forward to the pattern matching rfc maybe next year?

  • @CaptainFalcon92
    @CaptainFalcon92 3 месяца назад

    I've been using full public props on entity since they are typed and nullable. Doctrine deals with it just fine.

  • @Yogarine
    @Yogarine 5 месяцев назад +1

    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.

    • @Yogarine
      @Yogarine 5 месяцев назад

      I mean, just imagine big company X forks PHP and implements Generics. I'd be very tempted to jump ship myself.

    • @LarryGarfieldCrell
      @LarryGarfieldCrell 5 месяцев назад +1

      HHVM/Hack did that already. Nobody used it but Facebook and Slack. It's now incompatible with current PHP.

    • @Yogarine
      @Yogarine 5 месяцев назад

      @@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.

  • @CaptainFalcon92
    @CaptainFalcon92 3 месяца назад

    I want better functional-programming in php.

  • @johnrcornell
    @johnrcornell 5 месяцев назад

    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.

    • @bpdkuikel
      @bpdkuikel 5 месяцев назад

      Generics would be so awesome. 😢😢😢😢

    • @LarryGarfieldCrell
      @LarryGarfieldCrell 5 месяцев назад +3

      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.

    • @SXsoft99
      @SXsoft99 3 месяца назад

      For now use comments for generics

    • @marcinb7578
      @marcinb7578 2 месяца назад

      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.

  • @LewisCowles
    @LewisCowles 5 месяцев назад

    > 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.

    • @marcinb7578
      @marcinb7578 2 месяца назад

      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.