• HakFoo@lemmy.sdf.org
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    PHP.

    It picked a niche and fits exactly into it. It’s a language for server side web pages. It’s not a general purpose language shoehorned into the task, so it wisely sets boundaries. PHP could avoid a lot of async/await/promise hell because you can work in the mindset of HTTP requests-- terms of short lived requests that are compiled elsewhere. You don’t have fragile runtime environments (see: server-side JS), since it just plugs into Apache or Nginx, which are at least battle tested and known quantities to operate.

    It’s batteries included. Hell, it’s the entire Duracell company included. The standard library is rich and centrally documented, including decades of community nitpicks, even before you go into composer repos.

    It’s non judgmental. You can write procedural code, or object-oriented code, based on preference and fit to task.

    It makes ad-hoc easy and formal possible-- If I need an array of [227, “Steve” => “meow”, 953 => new FreightLocomotive()] I can get it, or I can enforce types where it’s relevant and mitigates risk.