Code indentation

>Preferred language
>Preferred indentation method
C, pic related for me.

I'm curious as if the preferred language has anything to do on how people indent code.

The Kind of Tired That Sleep Won’t Fix Shirt $21.68

DMT Has Friends For Me Shirt $21.68

The Kind of Tired That Sleep Won’t Fix Shirt $21.68

  1. 1 month ago
    Anonymous

    i don't ident
    t. js chad

  2. 1 month ago
    Anonymous

    What kind of troony indentation is this shit

    • 1 month ago
      Anonymous

      Super-man style:
      while(x==y){func1();func2();}

      • 1 month ago
        Anonymous

        Don't skip the whitespaces, and that's fine by me!

        What kind of troony indentation is this shit

        K&R > everything else, though Allman still is ok (wastes a line, though).

    • 1 month ago
      Anonymous

      >Haskell Style

      • 1 month ago
        Anonymous

        Try it with json and you'll see the value in it.

    • 1 month ago
      Anonymous

      Allman brothers rise up

    • 1 month ago
      Anonymous

      In defense of Haskell/Lisp, they feel much more natural when used in Haskell/Lisp.

    • 1 month ago
      Anonymous

      Allman for me
      C++

  3. 1 month ago
    Anonymous

    C. I'd put the } else { all on the same line:
    void draft() {
    if (condition == true) {
    //...
    } else {
    //...
    }
    }

    But also shrink it to one line if it was small enough.

  4. 1 month ago
    Anonymous

    if (property.HasValue) {
    // this
    }
    else {
    // that
    }

    • 1 month ago
      Anonymous

      this. Im not sure about the namespace casing yet
      namespace stuff {

      class MyThing {
      public:
      MyThing();
      virtual ~MyThing();

      auto myFunc() -> void
      {
      if (x == y) {
      //..
      }
      else {
      //..
      }
      }

      private:
      uint32_t m_my_variable { 0 };
      };

      }

  5. 1 month ago
    Anonymous

    void draft()
    {
    if(Condition)
    {
    x();
    }
    else
    {
    y();
    }
    }

    K&R is acceptable too.

  6. 1 month ago
    Anonymous

    There's only one indentation method silly billy.

    • 1 month ago
      Anonymous

      I like Python, but the lack of graphs annoys me to no end.

    • 1 month ago
      Anonymous

      >no column indentation in python
      Python code bases look like shit because of this fact

  7. 1 month ago
    Anonymous

    Indenting with spaces is degenerate. I will die on this hill.

  8. 1 month ago
    Anonymous

    >Preferred Language
    Common Lisp!
    >Preferred indentation method
    whetever picrel is called, I just let emacs do it for me

  9. 1 month ago
    Anonymous

    >else
    UHM ACTUALLY YOU SHOULD SHORT CIRCUIT YOUR CODE SO NO ELSE STATEMENTS ARE EVER NEEDED

  10. 1 month ago
    Anonymous

    I usually just use the clangfmt Microsoft preset with tweaks here and there. It's annoying since it's sort of like Allman, but most langs defaults and accept conventions are more like k&r and it just annoys me.

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *