• blindsight@beehaw.org
    link
    fedilink
    arrow-up
    54
    arrow-down
    1
    ·
    edit-2
    9 months ago

    idk, Allman is very readable. Easy to scan vertically to find the matching open brace. Not quite as vertically-space efficient as the best way, but it’s not offensive.

    • hardware26
      link
      fedilink
      arrow-up
      8
      ·
      9 months ago

      In my first ever programming class textbook was using Allman. Probably for this reason, it is easy for a beginner to match braces. It is a lot loss common industry to my knowledge.

      • blindsight@beehaw.org
        link
        fedilink
        arrow-up
        6
        ·
        9 months ago

        I literally don’t understand. I’ve read your comment several times and I don’t know what you’re talking about. Sorry!

        Did you think I was saying that made Allman better than the best way? Because it’s easy to scan vertically the best way, too. It’s just also easy with Allman, so it’s not offensive.

        • ubergeek77@lemmy.ubergeek77.chat
          link
          fedilink
          arrow-up
          6
          ·
          9 months ago

          I don’t think they were disagreeing with you, I think they were just trying to say:

          You shouldn’t need braces to be vertically aligned if your code is uniformly indented. Then you can easily see what code is paired together just by their indentation level.

          Of course this is not always true if you’ve got a bunch of crazy nested indentation pushing things off to the right.