Quick poll about code indentation
Quick poll about code indentation
To my surprise anonymous class-definitions seem to have double indents by default in Emacs, and apparently this is a normal indentation convention. It looks weird to me and I do not really see a good reason for this. What style do you prefer, and why?
This applies to any indent-width, but I am going with 4 spaces here. The two different indentation styles are demonstrated below.
Single indent:
Double indent:
This applies to any indent-width, but I am going with 4 spaces here. The two different indentation styles are demonstrated below.
Single indent:
Double indent:
Pay more attention to detail.
- fightinfrenchman
- Ninja
- Posts: 23508
- Joined: Oct 17, 2015
- Location: Pennsylvania
Re: Quick poll about code indentation
No indent is my preferred method
Dromedary Scone Mix is not Alone Mix
Re: Quick poll about code indentation
I prefer to write the open bracket in a new line.
onPress( )
{
queueCuirassier( );
}
onPress( )
{
queueCuirassier( );
}
- rickytickitembo
- Dragoon
- Posts: 266
- Joined: May 7, 2015
- ESO: RickyTickiTembo
- Location: Denver, CO
Re: Quick poll about code indentation
j_t_kirk wrote:I prefer to write the open bracket in a new line.
onPress( )
{
queueCuirassier( );
}
This. Plus, the alignment with the closing bracket helps as well.
My favorite donut is chocolate Aiz.
Re: Quick poll about code indentation
In my honest opinion, people who type opening braces on a new line deserve a rough spanking.
Pay more attention to detail.
Re: Quick poll about code indentation
It hasn't made sense to write compact code for a long time now. Spacious code is much more readable. Therefore opening braces should go on a new line imo. Most IDE's don't do this by default though, and I don't feel strongly enough about it to fix it every time so I just end up doing whatever the default behaviour of the IDE is. Thankfully Visual Studio understands.
Anyway double indent looks weird and pointless, I have never seen it used.
Anyway double indent looks weird and pointless, I have never seen it used.
Re: Quick poll about code indentation
Gendarme wrote:In my honest opinion, people who type opening braces on a new line deserve a rough spanking.
In my honest opinion, people who type opening braces on a new line in the same deserve a rough spanking.
Re: Quick poll about code indentation
I usually just unplug the computer.
Re: Quick poll about code indentation
Single indent, preferably of 2 or 3 spaces per tab. I find 4 spaces per tab are too much.
Who is online
Users browsing this forum: No registered users and 12 guests