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.

A Conspiracy Theorist Is Talking Shirt $21.68

It's All Fucked Shirt $22.14

A Conspiracy Theorist Is Talking Shirt $21.68

  1. 2 weeks ago
    Anonymous

    i don't ident
    t. js chad

  2. 2 weeks ago
    Anonymous

    What kind of troony indentation is this shit

    • 2 weeks ago
      Anonymous

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

      • 2 weeks 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).

    • 2 weeks ago
      Anonymous

      >Haskell Style

      • 2 weeks ago
        Anonymous

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

    • 2 weeks ago
      Anonymous

      Allman brothers rise up

    • 2 weeks ago
      Anonymous

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

    • 2 weeks ago
      Anonymous

      Allman for me
      C++

  3. 2 weeks 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. 2 weeks ago
    Anonymous

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

    • 2 weeks 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. 2 weeks ago
    Anonymous

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

    K&R is acceptable too.

  6. 2 weeks ago
    Anonymous

    There's only one indentation method silly billy.

    • 2 weeks ago
      Anonymous

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

    • 2 weeks ago
      Anonymous

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

  7. 2 weeks ago
    Anonymous

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

  8. 2 weeks ago
    Anonymous

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

  9. 2 weeks ago
    Anonymous

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

  10. 2 weeks 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.

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