• jason ( jason@discuss.online ) 
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 days ago

    Never understood the idea of, “if it needs to be fast, that part is in a faster language.” Why not just use the faster language? Most of the libraries that have Python wrappers also come with c headers. Sometimes you wind up in the reverse situation where your dependency doesn’t have a Python wrapper and now you’re stuck managing silly boilerplate. Python just feels like an extra thing in the way to wrangle for little gain.

    Also, hotspot-only optimization doesn’t seem to have held up in reality, right? We can all agree that software is getting slower every day. The infrastructure is slow.

    All feels like cope, through and through.

    • bss03 ( bss03@infosec.pub ) 
      link
      fedilink
      English
      arrow-up
      7
      ·
      4 days ago

      Why not just use the faster language?

      Because the other language is more developer-friendly or faster to write/read even if slower to execute. Some code doesn’t need to be fast because it is always waiting on other things anyway.

      Some languages effectively prevent whole classes of runtime failures / bad code. But, they do that by doing more which takes longer, at compile-time, run time, or both.

      Some programs can’t avoid graph-structured data dependencies. In that case, the simplest solution is a garbage collector, and one built into the runtime is capable of being more efficient (and less buggy) than one written for a specific program.

      Anyway, there are many factors that determine which language is “best”, and not all of them are objective. That’s why we don’t just use the fastest language. (Currently, I do all my coding in either Idris or Purescript, but I’m also unemployed and just programing for myself, for now.)