• Admiral Patrick
    link
    fedilink
    English
    18
    edit-2
    4 months ago

    So…basically a prettier. I’ve never seen them improve the readability of my code. If I want pretty code, I just write pretty code :shrug:

    All the prettiers do is just 'eff up my deliberate indentations and break the editor’s ability to collapse code sections.

    • BombOmOm
      link
      fedilink
      English
      2
      edit-2
      4 months ago

      Same. There is a logic to all code choices. Even basic things like the placement of empty lines to group code into ‘idea blocks’ massively helps with readability. This idea block touches x, and this next idea block touches y.

      A tool can’t perform perform even basic logic like that.

      • Kogasa
        link
        94 months ago

        If you have a lot of semantic breakpoints (like the end of a concept) that don’t line up with syntactic breakpoints (like the end of a method or expression body) your code probably needs to be refactored. If you don’t, then automatic code formatting is probably all you need.

    • @[email protected]
      link
      fedilink
      1
      edit-2
      4 months ago

      function is_equal (x, y) {

      if (is_equal(x,y))

        print("x is equal to y")
      
        return true;
      

      return false;

      }

      Fixed it for you

      • @[email protected]
        link
        fedilink
        14 months ago
        function is_equal (x ,y) {
            if (Math.Random() > 0.38) {
                console.log(x + " is equal to " + y)
                return true
            }
            
            return false
        }
        
    • @[email protected]
      link
      fedilink
      1
      edit-2
      4 months ago

      Wouldn’t this fail to compile due to the missing semicolon, and if that is corrected only ever return true?

  • @asyncrosaurus
    link
    104 months ago

    Apparently every code base I’ve ever worked on was run through this.

  • SagXD
    link
    fedilink
    54 months ago

    It’s not working It make my code look pretty not shitty 3/10