Source.

Yep, PHP is turning 30 this year! Wondering if “PHP is still relevant?” Ever since we have been hearing that PHP is dead. It was “dead” 10 years ago, 5 years ago, and “is dead” today. But somehow - it isn’t. Anyway… happy birthday!

  • thesystemisdown@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    1
    ·
    5 days ago

    Modern PHP is better because it’s modern. Which early version of a programming language was good? I’ve used a lot of them, and by modern standards, I think dog shit is a somewhat appropriate description for most of them.

    • azertyfun@sh.itjust.works
      link
      fedilink
      arrow-up
      14
      arrow-down
      1
      ·
      5 days ago

      It’s one of a plethora of scripting languages from the '90s which were designed to be the antithesis of “fail fast” and kept going no matter what.

      I guess what with C/C++ being the Mainstream Option at the time, not having to deal with a strict compiler must have felt like freedom. As someone who has had to maintain, cleanup and migrate ancient PHP code, I call it folly. That mindset of “let the programmer just do whatever and keep trucking” breeds awful programming practices and renders static analysis varying degrees of useless, which makes large-scale refactoring hard to automate which is just amazing when your major versions aren’t even remotely FUCKING BACKWARDS COMPATIBLE.

      PHP’s original design is just fundamentally atrocious. It became popular in large part because unmaintainable code is usually someone else’s problem.

      A language that I would definitely use for server-side rendering and that was already good from its first stable release is Go. It was thoughtfully designed and lends itself really well to static analysis, while still being easy to write and decently performant.

      • bestboyfriendintheworld@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        19 hours ago

        Early Swift was very slow to compile and start. The debugger was nonfunctional.

        Otherwise it was pretty usable. Especially since it got to leverage the huge libraries written for Objective-C.

        Which meant it lacked some basic collection types. A Swift native Set was introduced with Swift 3 IIRC. Before that you had to bridge back and forth between Swift and Objective-C. Sometimes leading to unexpected behavior at runtime.

        In Objective-C if an object reference was nil, you could send it messages (call methods) without a problem. Swift however did away with this. Optionals had to be explicitly unwrapped. So if the annotations weren’t correct, Swift code would crash at runtime where Objective-C would have been fine. Lots of bugs related to that existed.

        Swift peaked around version 4. Since then, they have been adding kitchen sink features and lots of complexity to feel smart.

        I still would have preferred an Objective-C 3.0. Chris Lattner was a C++ guy and never really understood Objective-C culture and strengths.

    • Decq@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      5 days ago

      It’s been about 20 years since I’ve touched PHP. So i don’t remember all the problems i had with it.

      But some language from those times were at least consistent with itself and clearly more thought-out. Even though they might miss some of the nicety we’ve come to like nowadays. Of course for web development there weren’t many better choices back then.

      But I’m heavily skewed towards non-oo, static typed, explicit languages so PHP was probably never for me.