• SpaceCowboy@lemmy.ca
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    1 month ago

    Stylistically, you’re changing the array when you add something to it. Javascript is a janky language in the best of times, but FE devs like to artificially introduce additional unnecessary complexities on top of the jank.

    const is simpler. why would I declare an array as let if I’m not reassigning?

    Why would you declare a const that’s going to have different data every time to function is called?

    Now I’m thinking it’s a form of gatekeeping. Just an excuse for FE devs to throw out terms like “immutable” to make it sound like they know what they’re taking about. Y’all need to constantly sound like you know what you’re talking about when dealing with users, pretending weird stylistic choices have real technical reasons for them. But the BE devs know what you’re saying is complete bullshit LOL.

    • masterspace@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      You are literally just describing the conceptual differences between functional programming and object oriented programming. It has nothing to do with front end vs backend, except for the fact that React has vastly popularized functional paradigms on the frontend.

      You should keep an open mind, functional programming is basically what object oriented programming looks like if you were to actually follow all the SOLID principles.