• @flamingo_pinyata
    link
    98 months ago

    After 10 years of doing it for work, I still get frustrated about language issues.

    But semicolons? It’s 2023, why does your language have semicolons at all? If you’re one of those poor sods stuck with Java, still it’s not an issue, all IDEs will warn you, and basically complete half the code for you.

    • @Windex007@lemmy.world
      link
      fedilink
      118 months ago

      It’s 2023, why does your language have semicolons at all?

      Explicitly constructing your intentions are features of a language.

      I LOVE types. I LOVE semi colons. I LOVE compiler errors.

      Why? Because the ALTERNATIVE is finding (if you’re lucky) unexpected behaviour at run-time.

      I promise, I promise SO HARD, that memes about semi colons or “my code doesn’t compile” are GREAT problems to have.if that’s what’s making you sad, your life is good and you’re getting paid 10x too much.

      • @_danny@lemmy.world
        link
        fedilink
        108 months ago

        People who are annoyed by types have never had to spend weeks of their life hunting for a missing property on an object.

        Compilation errors are so much more preferable than finding out the same error at runtime.

        • @Rodeo@lemmy.ca
          link
          fedilink
          2
          edit-2
          8 months ago

          Ada has got your back. Entire classes of runtime bugs in C code are eliminated by compiler errors.

          You can’t even make a integer overflow unless you’ve explicitly declared that statement as unsafe.

      • @flamingo_pinyata
        link
        88 months ago

        Semicolons are not at all comparable to types.

        Types give structure to your program, prevent bugs and make team work easier. Semicolons are an artifact of the times it was thought multiple statements could go on a same line. Although I do admit, they make language design easier.

    • @soggy_kitty
      link
      48 months ago

      They pay me more money than all of the other Devs because I’m the only guy willing to take on our existing stacks usage of shudders JavaScript. Most Devs I meet straight up refuse to learn it, let alone code in it.

    • @nathris@lemmy.ca
      link
      fedilink
      18 months ago

      Semicolons are optional in JavaScript unless you are combining multiple statements on a single line, which is generally not something you should be doing anyway.

      I avoid them whenever possible. It encourages people to write poorly formatted code. But then I’m a python dev so I tend to be opinionated when it comes to whitespace.

      • @folkrav@lemmy.world
        link
        fedilink
        2
        edit-2
        8 months ago

        Just slap a formatter on there and call it a day. Semicolon or not, IDGAF, let’s just stop with the formatting bikeshedding. There are more important things to think about. They don’t encourage anything if you don’t think about formatting.

        • Aa!
          link
          fedilink
          18 months ago

          This is one of the things I like most about Go. Formatting is already defined and handled by go fmt. Takes out all format arguments before they start.