|
The first style is usually called "K&R", while the second is often named Allman. There are countless variations based on indentation of the following code body. I started out using K&R when I learned 'C' from, er, the K&R. When I learned C# where the convention leans hard toward Allman, I found I preferred Allman braces.
I have significant visual problems: myopia, astigmatism, presbyopia, and glaucoma in the left eye, and the right one is made of plastic. Did I mention the cataract forming in the left eye?
Allman adds white-space and highlights braces, both of which improve readability greatly for me.
One good thing about venerable VS2008 still being an active tool in our shop is that I have a Visual Studio editor macro that converts K&R style to Allman. I don't like the reformatters in later editions of Visual Studio.
Software Zen: delete this;
|
|
|
|
|
I'm totally K&R, but I upvoted this anyway just because you're cool. #no_shame
Jeremy Falcon
|
|
|
|
|
Thanks Jeremy. Glad to see you coming around here again!
Software Zen: delete this;
|
|
|
|
|
I generally prefer the latter but it depends ... = [](){ return on my mood + on the number of enclosed statements + on the kind of those statements e.g. for some reason I like lambda 's all in one line + on the complexity of those statements + on whatever surprises the automatic formatting of IDEA has in store for me; }();
|
|
|
|
|
This is the only correct way:
void AFunc() {
}
Embrace it. Join the dark side.
Jeremy Falcon
|
|
|
|
|
Not what's usually done on leaving (9)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Departing ?
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Nope!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Departure ?
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
You are up tomorrow!
Sorry about rejecting "DEPARTING", but it didn't quite fit the first part of the clue.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
No worries I thought it was one or the other - I just chose the wrong one first.
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Explanation, please?
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
Not what's usually done DEPARTURE - as in "departure from our usual procedures".
on leaving DEPARTURE - as in "use the departure terminal on leaving the country"
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Thank you
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
You're welcome!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 541 4/6
⬛🟨🟨⬛⬛
⬛⬛⬛🟨🟨
⬛🟨⬛🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 541 4/6
🟩⬜⬜⬜⬜
🟩⬜⬜⬜⬜
🟩🟨⬜⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 541 4/6
⬛⬛🟨⬛⬛
🟨🟨⬛⬛🟩
🟩⬛🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 541 4/6
⬜🟨⬜⬜⬜
⬜🟨⬜⬜⬜
🟩⬜⬜⬜🟨
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 541 4/6
🟩⬜⬜⬜⬜
🟩⬜⬜⬜⬜
🟩🟩⬜🟩🟩
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 541 4/6
🟩⬜⬜⬜⬜
⬜⬜⬜⬜⬜
⬜⬜🟨⬜🟩
🟩🟩🟩🟩🟩
Looks like 4 is par!
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Wordle 541 4/6*
⬜⬜⬜🟨⬜
⬜⬜🟨⬜⬜
⬜🟨🟨⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 541 4/6
⬜⬜⬜⬜⬜
🟨🟨⬜⬜⬜
⬜🟨🟨⬜⬜
🟩🟩🟩🟩🟩
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
⬜⬜🟨⬜⬜
🟩⬜⬜⬜⬜
🟩⬜⬜⬜⬜
🟩🟨⬜⬜🟩
🟩⬜🟩🟩🟩
🟩🟩🟩🟩🟩
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 541 5/6
⬜⬜⬜⬜⬜
⬜⬜⬜⬜🟨
🟩🟨⬜⬜⬜
⬜⬜⬜⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|