41

How many of you naturally used Allman style, even though your first programming class taught you to use K&R?

Comments
  • 18
    My classes taught me Allman, I switched to K&R. It looks cleaner, IMO.
  • 9
    I was taught Allman (which I still prefer), but I use whichever one is standard for the language. For C# for example I use Allman, for Java I use K&R.
  • 5
    I learned by my own and I've always used K&R because it looks cleaner. After years someone asked me to use Alman and it is hard to change habits now.
  • 6
    Cool, didn't know there were names for this. I prefer K&R but use Allman for C# and anywhere else it's standard. Can't stand it in CSS though 😲
  • 4
    Allman all the way for me. It helps me see code blocks much easier when using a text editor like Notepad++ or vim.
  • 24
    Can we take a minute and talk about shitty indentation?
  • 3
    I've been learning Elm recently and I'm getting used to the comma first style it uses:

    Model =
    { foo: bar
    , x: y
    , a: b
    }
  • 2
    My exact thought. the second line in the while loop is not indented. @DustInCompetent

    Allman all the way! Simply looks cleaner, in my opinion.
  • 1
    I use allman, i think its better to see the itentation...
  • 1
    When I code in C/C++ I use Allman, but when in JavaScript I use K&R because I test using standard, second is more readable in my opinion, the first one was teach to me at the uni and as I was a newbie in programming it was seeded in my brain haha
  • 0
    @vortexman100 indentation + intention?
  • 2
  • 1
    Didn't realize there were names for this. Definitely prefer K&R myself.
  • 0
    @DustInCompetent haha did not realize the shitty indentations, I copypasted it from wikipedia
  • 1
    @Gexgekko i use a code formatter hook, which formats the code for me before saving the file. So I can attach to the project styles I'm working on.
  • 5
    Or just use this
  • 0
    K&R gives me the creeps. Seriously. No joke. Idk what causes this. But I love Allman!
  • 1
    I simply prefer Allman
  • 1
    Am I the only one who uses k&r in c#?
  • 1
    @brunmcray my eyes bleed x-(

    On a side note Allman all the way for me and braces for each and every if/while/for/...

    Only exception I tolerate : one liners like : if(...) Blah;
    But even then I prefer adding braces and Allman...
  • 3
    K&R master race
  • 2
    for me Allman reads more 'natural' regarding indentation.
  • 0
    @MicroNibble guess so. What do you use?
  • 0
    I started learning on my own, and started by using K&R style because why waste a whole another line for a bracket... Lol, also mostly habit at this point in life
Add Comment