A Flash Developer Resource Site

View Poll Results: What style of intending do you use?

Voters
7. You may not vote on this poll
  • The One True Brace Style

    4 57.14%
  • Allman style

    3 42.86%
  • Wha?

    0 0%
Results 1 to 11 of 11

Thread: What type of indenting do you use?

  1. #1
    Moonlight shadow asheep_uk's Avatar
    Join Date
    Dec 2001
    Location
    London
    Posts
    2,010

    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?

  2. #2
    Hood Rich FlashLackey's Avatar
    Join Date
    Aug 2006
    Posts
    148
    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

  3. #3
    FK's Official Mac Hater jasonsplace's Avatar
    Join Date
    Mar 2002
    Location
    Provo, Utah
    Posts
    2,245
    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.

  4. #4
    supervillain gerbick's Avatar
    Join Date
    Jul 2000
    Location
    undecided.
    Posts
    18,987
    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"...

    [ Hello ] | [ gerbick ] | [ Ω ]

  5. #5
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    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.

  6. #6
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    doesn't matter anymore. Can't have a preference with as many sources of code I deal with.

  7. #7
    Moonlight shadow asheep_uk's Avatar
    Join Date
    Dec 2001
    Location
    London
    Posts
    2,010
    Quote Originally Posted by jAQUAN View Post
    I have a massive penis.

  8. #8
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    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

  9. #9
    Senior Member Genesis F5's Avatar
    Join Date
    Jan 2002
    Location
    Unallocated memory
    Posts
    1,845
    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.

  10. #10
    Moonlight shadow asheep_uk's Avatar
    Join Date
    Dec 2001
    Location
    London
    Posts
    2,010
    Quote Originally Posted by jAQUAN View Post
    I didn't know my mistress has an fk account

  11. #11
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center