Generics in PHP

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

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

  • @Chemaclass
    @Chemaclass 2 года назад +6

    I would really love seeing generics in PHP. Great explanation video!

  • @mreduar
    @mreduar 2 года назад +8

    I loved the way you explained it, so clear and to the point and it didn't even take you 10 minutes. Wonderful

  • @lostcarpark
    @lostcarpark 2 года назад +2

    Totally agree this would be a game changer for PHP.

  • @georgeageorgopoulos
    @georgeageorgopoulos 2 года назад +1

    Dude, thanks for supporting PHP with your videos

  • @JellyLancelot
    @JellyLancelot 2 года назад +8

    One of the biggest features missing from PHP IMO, I love working with Generics in other langs and really miss them when coming to PHP. It could clean up quite a bit of class structure and code.

  • @MichaelPritchardRR3
    @MichaelPritchardRR3 2 года назад +5

    One of the best things about PHP is you can start with echoing Hello world all the way through to building highly complex business apps, with coding standards, tests and static analysis . PHP is a fantastically flexible language! P.S. If you are interested in Static Anlysis there is a meetup called PHPMinds in Nottingham whao have talk on PHPStan by Ondřej Mirtes Thu, Mar 10 @ 6:30 PM GMT, "Tuning PHPStan to Maximum Strictness"

  • @jsomhorst
    @jsomhorst Год назад

    Thanks for pointing out the dangers of type juggling and type hinting. A couple of weeks ago we had a situation where 'they know that we only pass strings' but in practice they also passed arrays. To bad we found out when we put things into production ( yes yes, old code, no unit tests etc )

  • @KeganVanSickle
    @KeganVanSickle 2 года назад +3

    Great video Brent! Keep up the PHP evangelism!

  • @iamdew
    @iamdew 2 года назад

    I like that you speaking about Generics with generic background music.

  • @CottonInDerTube
    @CottonInDerTube Год назад +1

    Optional is important.
    Build up, not force up.

  • @toblamabor7072
    @toblamabor7072 2 года назад

    Man you are great, thank you so much for these videos!

  • @TroyNiemeier
    @TroyNiemeier 2 года назад

    "But, what if we need a turd implementation?" (4:22) haha
    Sorry to tease about your accent. (Your English is obviously very good, it's just too funny. My Norwegian friends do the same thing.)
    Thanks for the mini-series, as well! I appreciate the great PHP content! I love using PHP.

  • @hugogoncalves77
    @hugogoncalves77 2 года назад +1

    I would love to have generics in PHP, having a vast background on using them on C# and Java.

  • @Pekz00r
    @Pekz00r 2 года назад +1

    I'm all for as well. As long as it is optional, I don't see any major drawbacks.

  • @AmitMerchant
    @AmitMerchant 2 года назад +5

    Support for generics could easily put PHP on the level of other big boys!

    • @kevinflorenzdaus
      @kevinflorenzdaus 2 года назад

      true..
      I love where PHP is going ..
      enterprise love it!

    • @atis737
      @atis737 2 года назад

      its already above them all

  • @NathanBudd
    @NathanBudd Год назад

    Watching this has made me suddenly understand at least what I'm looking at when I see code snippets in TypeScript now. I often wondered what the was,
    Cheers!

  • @oliverschmidt5787
    @oliverschmidt5787 Год назад

    If we would get generics, i could finally throw all these type unsafe list wrapper objects away. What an awesome world that would be

  • @bambamboole1
    @bambamboole1 2 года назад

    very nice video! I am also all for generics

  • @samansamany9339
    @samansamany9339 2 года назад

    Great video

  • @comod
    @comod Год назад

    Yes we want them! And i cant understand why we cant have them. Why not simply use type erasure under the hood only for the generic parts of the code? Better stable written and "weak" executet than bad written (mixed type), full of boiler-plates and workarounds...

  • @elliottmarshall1424
    @elliottmarshall1424 Год назад

    I think this is missing because php doesn't have an object base type, that all classes extend off

  • @this.channel
    @this.channel Год назад

    I don't know what generics are and why should I care?

  • @ricko13
    @ricko13 Год назад +1

    Basically you're talking about _Typescript_ for PHP

  • @amitavroydev
    @amitavroydev 2 года назад

    awesome

  • @matte.309
    @matte.309 Год назад

    I've always had a hard time wrapping my head around Generics, but it was always shown in C# or C++ which didn't help.

    • @phpannotated
      @phpannotated  Год назад +1

      So, did this video help?

    • @matte.309
      @matte.309 Год назад

      @@phpannotated yeah, sorry I dropped the first part of that sentence. This was really useful.

  • @dclindner
    @dclindner 2 года назад

    Awesome timing. I'm pulling my hair out trying to figure out how to use Larastan / PHPStan with interfaces, inheritance and their use in relationships. Ugg...it doesn't make sense to me. lol.

  • @TrondHus
    @TrondHus 2 года назад

    yes that would be nice. It is how it is done in c# ... how ever - I don't mind creating a UserCollection or similar to make sure I am dealing with a collection of type user...

    • @hugogoncalves77
      @hugogoncalves77 2 года назад

      Yes, but its a pain when you need to create 50 collections classes when you could just have a generic collection class :)

  • @icemonkeyeffect
    @icemonkeyeffect 2 года назад

    Reddit :)