+ 34
Which is your preferred style while writing programs?
K&R: class A { //code } or Allman: class A { //code } Mine is K&R with 4 level of indentation. Write yours and let's see which style has more users.
19 odpowiedzi
+ 24
Allman !! :)
+ 20
K&R
+ 12
It's just the way we look into the code
+ 11
K&R in the following format -
if (condition) {
// code
} else {
// code
}
+ 10
K&R
+ 9
My style is :-
Anything works xD 😅😂
+ 9
K&R with whitesmiths style...☺
+ 7
K&R 😅
+ 6
K&R 😀
+ 6
Allman ftw!
+ 6
I was Allman but i am now K&R, however; I think it is subject to the personality.
+ 5
Allman 😊
+ 5
Mine is K&R. The Allman's curly braces placement feels a bit "unnatural" to me xD
+ 4
K&R always!
+ 4
Depends on the language:
- Java prefers K&R
- C# prefers Allman
I usually use the one the given language prefers, but tbh I personally like it the K&R way. Counting additional "{" rows are really waste of line numbers and too loose for my eyes. I started with C# and then learned Java, it is not because of the learning order :))
+ 3
Allman! :)
+ 3
second one....
+ 3
Allman