• @[email protected]
    link
    fedilink
    3
    edit-2
    1 year ago

    PHP grew “organically” out of a perl library. There was never a consistent plan/idea about the set of abstractions it provides, the type system, builtin functions etc… Everything has been bolted on here and there, some additions good, some bad, some terrible pitfalls. A language with builtin operators that are basically unusable (comparison!) and where some functions return false when the input is invalid, is really fundamentally broken. I agree that many of the worst failures of PHP have been (kind of) fixed after PHP5 and that’s nice for large existing PHP codebases (mediawiki, wordpress, nextcloud, typo3). But I just can’t understand why one would start new projects in PHP in a world where so many very well designed and well thought through languages exist.

    Edit: First sentence is misleading. Of course it wasn’t a perl lib, but basically a thrown together bunch of functionality, unified into one package, so it can replace using various perl libraries. The syntax was also very inspired by perl.

    • Phoenixz
      link
      fedilink
      11 year ago

      Yes, PHPs beginnings were very messy and even today we see results from that.

      But PHP was and remains hugely popular because it’s so easy and fast to work with and today it is very nicely designed and worked out. Yeah there are many details open but editors help you out with that. Other languages may be more consistent at the core but they have their own issues. JavaScript is a nightmare to work with for me, personally, but I o dont bitch about it every opportunity I get.

      I guess I’m just slightly annoyed with people complaining about PHP while it’s just another language and it’s success speaks for itself

      • @[email protected]
        link
        fedilink
        11 year ago

        Yes, JS is equally terrible! At least we can agree on that :-P

        And I also understand that PHP (just like most technologies) can be very efficient to work with if you are used to it and know it very well.

        • Phoenixz
          link
          fedilink
          11 year ago

          Well, if it comes to web development (my main focus since the last decade at least) I think it’s fair to say there is little that nears PHP (or, begrudgingly, JavaScript)in functionality. With current frameworks (my own included) I can churn out highly complicated and fast sites in no time. Can’t say that for many other languages.

          Java? “Fast”? Lol no. “No time”? Lolol no.

          Python? Honestly I have too little experience with it to say, but at least frameworkoptions are much more limited anyway