View Poll Results: What style of intending do you use?
- Voters
- 7. You may not vote on this poll
-
The One True Brace Style
-
Allman style
-
Wha?
-
Moonlight shadow
What type of indenting do you use?
So I'm starting to use CodeIgniter and I'm reading through some of the tutorials. I can't help feeling my intent style is out-dated.
I use "The One True Brace Style".
Code:
if($bananas > 9) {
$bananaparty = TRUE;
} else {
echo "You do not have enough bananas for a banana party";
}
However, everybody else seems to be using the Allman style.
Code:
if($cats > 3)
{
echo "Too many cats";
}
else
{
echo "You have a normal amount of cats";
}
What do you use?
-
Hood Rich
Didn't know it had a name. Once I got used to the Allman style, I appreciated the change. [Better spacing I think.]
Last edited by FlashLackey; 10-02-2009 at 06:22 AM.
"We don't estimate speeches." - CBO Director Doug Elmendorf
-
FK's Official Mac Hater
I prefer the One True Brace Style but I know lots of other coders that prefer the Allman style.
Jason L. Wright
I'm not that hard to imitate. Just make some random negative claim at Apple or anything else for that matter and then have nothing to back it up.
-
supervillain
OTB style... all day for me. I can't read Allman all of the time, the braces slow me down for some reason, stops my ability to count them despite being pulled out in the "open"...
-
Bearded (M|G)od
Depends on the language. If the language uses curly brackets, I like to keep them on their own line and space out my code more.
-
Total Universe Mod
doesn't matter anymore. Can't have a preference with as many sources of code I deal with.
-
Moonlight shadow
 Originally Posted by jAQUAN
I have a massive penis.
-
Total Universe Mod
that wasn't meant to be bragadocious. Just that some text editors autocomplete one way. Some third parties write there's another. It's not enough of an annoyance to justify nitpicking.
Oh and I'm pretty sure my wife doesn't have an fk account
-
Senior Member
Allman all the way. There's a clear start and stop to a specific block of code. With the OTB style, you could have a function with a hundred different parameters that pushes the opening brace clear off of the screen. The only time I use OTB is if I'm initializing a large object manually and don't want to indent for aesthetic reasons, but that's very rare.
-
Moonlight shadow
 Originally Posted by jAQUAN
I didn't know my mistress has an fk account
-
Senior Member
I like Allman, aehem, Allwomen
- The right of the People to create Flash movies shall not be infringed. -
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|