• FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    13 days ago

    Experience has shown that having a map as your only data structure is definitely a mistake. It’s much better to support real arrays too. I doubt it would have made the implementation significantly more complex either (maybe even simpler for luajit).

    • pet the cat, walk the dog@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      13 days ago

      Idk, PHP chugs on splendidly with arrays that combine both arrays and maps. I regret to say that PHP is considerably faster than some better languages like Python and Ruby, and arrays are the workhorse structure there.

      (Like, PHP’s approach to FastCGI is that the script’s runtime is destroyed after every request and then started anew for the next one, and it still outperforms Python’s always-on approach. Of mainstream languages, only Node can compete.)

        • pet the cat, walk the dog@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          12 days ago

          Weird choice of lifestyle to complain about the two fastest scripting languages being ‘fast-ish’. While you complain, the world is using Lua for embedded scripts and game programming, and PHP for the web.

          People straight up write libraries in Lua instead of C, because the performance difference is unnoticeable. But apparently it’s only ‘fastish’.

        • pet the cat, walk the dog@lemmy.world
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          8 days ago

          Feel free to look them up, I’m not preventing you from doing that.

          I’ve had my own field experience with evaluating PHP vs Python, and know who came out on top.