• whatsarefoogee@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    1 year ago

    Being easy to understand is one of the primary goals of any programming languages.

    The problem with Javascript is that it isn’t easy to understand. Javascript is easy to write.

    That’s why it’s easy for novices to pick up and why it ends up being spaghetti code. It’s very unrestrictive and allows writing very poor code that works based on assumptions and breaks when the assumptions aren’t met.

    It made sense at the time because it was just a scripting language for some minor website things, and you didn’t want your site to crash if your script ran into a problem.

    Now it’s being used to write full fledged applications and it’s past design choices are still haunting it.

    • BeigeAgenda@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Compiled languages at least say “hey don’t do this” and fail or warn you with “this is a bad idea”.

      But hey I still use python, but also pylint to help me avoid mistakes, I just disable the style part for my own sanity.