|
|
Don't you know what this will do to Griff's ego if you publicly declare him "right all along".
|
|
|
|
|
It's cool - I don't believe a word of it!
"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!
|
|
|
|
|
|
I agree completely, whoever came up with K&R style ( probably K&R ) were out of their mind, no matter whatever other brilliant stuff they came up with.
What could be better than:
{
...
...
}
|
|
|
|
|
Their 8-space (tab) indentation is worse. Despicable, in fact.
|
|
|
|
|
I didn't know about that one but yes 'despicable' would be the only valid term I can imagine.
|
|
|
|
|
Greg Utas wrote: Despicable, in fact The word 'despicable' is a moral judgment. Given that they invented the brace style at the same time they invented the C programming language, and tabs were 8 spaces wide because of teletypes and other such hardware, a little bit of understanding might be in order.
Software Zen: delete this;
|
|
|
|
|
I've been known to indulge in hyperbole.
|
|
|
|
|
I prefer parabole myself, but toe-may-toe, toe-mah-toe...
Software Zen: delete this;
|
|
|
|
|
It WAS Griff, and me! But methinks he was advocating Whitesmith's
Indentation style - Wikipedia[^]
if(this->aintUgly())
{
thenWhatIs(); }
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
Ugh, workable but I don't like it
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Allman all the way, for me. "White space" is cheap, now ... compared to when "real programmers don't eat quiche." [^]
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
Ah, it's been so long since we had a braces war
Allman style is awesome, K&R is fugly
But I like Python even better, where indentation determines scope.
Cheers,
Vikram.
|
|
|
|
|
Vikram A Punathambekar wrote: I like Python even better, where indentation determines scope You just like to sit back and watch the world burn, don't you?
Software Zen: delete this;
|
|
|
|
|
Haha, I do, but in this case I am serious, I like this Python feature.
Cheers,
Vikram.
|
|
|
|
|
The notion of significant white-space gives me PTSD-flashbacks to my FORTRAN days
Software Zen: delete this;
|
|
|
|
|
Allman braces are morally, ethically, and spiritually superior to any other brace style, including K&R.
Software Zen: delete this;
|
|
|
|
|
Shouldn't this be our default position?
|
|
|
|
|
OMG, I had to lookup Allman style to confirm...
My argument was ALWAYS that we line these things up so they can be matched properly.
And I believe the blank space adds context.
void main / if / while -> all have the same simple formatting
{
// Yes this is good
}
and doubly hated the dual indentation:
if ()
{
// then this
}
REALLY hated:
if ()
{
// Same level, Uggh
}
So, welcome aboard. it just seems more consistent, and since I do a TON of Pascal/Delphi and PL/SQL, etc, etc. Where I would strangle someone for:
if () BEGIN
// OMG
END
|
|
|
|
|
Might have been me under an old account. I remember vehemently defending Allman a couple of years back, after deep diving a few enormous legacy codebases for a consultancy gig.
The speed at which I can parse large volumes of code when it's Allman is much higher, all because of the visual clues that are tied in with the control logic. I'm mostly scanning the control logic by identation, only sparsly reading evaluations along the way.
|
|
|
|
|
For me the only style is the "one true brace style"
Allman makes sense for non-braced languages, though (like python).
|
|
|
|
|
First, let me say that those who use their lawn, sand, corncobs, a garden hose, or similar devices need not read on.
Background:
For the rest of us, I was wondering about something. Not long ago I had a multi-roll package of bathroom tissue (toilet paper, ass-wipes, &etc) that lacked perforations. The papers grain runs the long way, along the length of the roll, which added a minor challenge to tearing off an aliquot for its designated task. Now, thankfully, things are back to normal.
Question to ponder:
As prices vary by location, perhaps give a a percentage of the cost/roll, but how much extra would you pay for a roll if perforations were optional (vs. tearing or having a shared scissor at hand).
OK - it's crazy and off the wall (pun intended) of a question, but life's full of little things (another pun) in the background that make things go smoother.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Quote: how much extra would you pay for a roll if perforations were optional This is such a defect that I'd only pay extra if I could return it. Used. In a box with a prepaid shipping label.
|
|
|
|
|
Greg Utas wrote: shipping label Is that a euphemism?
|
|
|
|