3
Cobalt
8y

void method
{
}

>

void method {
}

Comments
  • 3
    <

    void method() { }

    😉
  • 1
    Have the ++ young grasshopper. May you change your mind before ever working in my team. :)
  • 0
    @darkcode curious though, why is the latter preferred so much? I like the former because it lines the braces nicely, you can see where it begins and ends.
  • 3
    @Cobalt well I can perfectly see where it begins and ends with the second style too! Indentation is enough for that anyway (cf Python).

    I prefer the second because it allows me to see more LOC on my screen, without sacrificing readability. The first one feels like a useless empty line.
    For info, the second style is the one used in Git and the Linux kernel :)
  • 3
    ^ this @Cobalt

    Screen retail space is precious in large projects
  • 3
    def something():
    pass

    or

    function something()
    end

    In my case

    And the occasional

    function something() {
    }

    or

    something = function() {
    }
Add Comment