|
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?
|
|
|
|
|
Not only would I not pay, I would bill the manufacturers of perforation-less toilet paper for garbage disposal.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Maybe that's a better idea than I had - I just requested they send me the perforations and an installation manual.
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 |
|
|
|
|
|
|
First of all, doesn't COBOL begin with "C" - so what's the problem?
Begs another question (and gives a job to Chris):
Note that items on the menu and price (RM). OK - something tells me that despite the account's designation this is not from the US. Perhaps use the IP's location to assign the default country?
Why do I keep going to this subject (i.e., correct designation) ? Many years ago - my first time traveling abroad, in fact, I fell in with some traveling companions. One Canadian, one a Scotsman. Besides learning that the Scotsman's version of English needed to be repeated in English order for non-native speaker to understand him, I observed that either or both of them would often where t-shirts and such with US flags and other logos on them and it was at those times they became particularly rude and poorly behaved. Now it may be wearing the garments was the cause, but the bad behavior was improperly attributed to US student/traveler behavior. Similarly, for better or worse, it would be nice to attribute posts to the appropriate source.
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 |
|
|
|
|
|
Very few new members take the trouble to select their country of origin when creating their accounts. They are all in too much of a hurry to type their homework question and get back to their proper day job of staring vacantly into space.
|
|
|
|
|
Richard MacCutchan wrote: get back to their proper day job of staring vacantly into sp Alas ! (+)
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 |
|
|
|
|
|
Staring vacantly into sp? What's that? A sell phone? Sacepook? Spwitter?
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I think you will find that most of the old COBOL programmers are retiring or dying out which leaves a rather large code base of legacy systems (usually bank and government) systems that still have to be maintained and that people need to be trained to do such work.
|
|
|
|
|
As much as we disparage vast swaths of our profession, this indicates that our products' longevity sometimes surpasses that of many other industries.
|
|
|
|
|
Regrettably, only because nobody but the guy who wrote them understands them enough to change 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!
|
|
|
|
|
Actually, adding capabilities to existing products is something that we probably do better than any other industry. Not only that, we're humble, because we still kick ourselves for being lousy at it.
|
|
|
|
|
I, very recently, had to do some COBOL. At first it was just to read it and work out what it was doing so that the algorithm could be duplicated in out new C# system. However that led to some fixes being needed in the COBOL itself (running on a mainframe, remember those?).
Luckily I was old enough to have those skills - although not fresh, not too stale!
Yes, I currently work for the government.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Quote: Yes, I currently work for the government. Don't expect any sympathy on this forum.
Get me coffee and no one gets hurt!
|
|
|
|