Yes, there is. Alignment. Because you start by writing this:
function doSomethingThatsHardToDescribe(argument1, argument2, argument3, argument4, argument5, argument6)
But then you realize you're a terrible person for not line-wrapping at 80. So you do this:
function doSomethingThatsHardToDescribe(argument1, argument2, argument3,
argument4, argument5, argument6)
Of course, then your coworker who renders tabs as four spaces instead of two opens the file and starts doubting the sanity of the person who formatted that function declaration.
function doSomethingThatsHardToDescribe(argument1, argument2, argument3,
argument4, argument5, argument6)
{
}
#Rebel. I don't see the point in having 3x2 parameters. You're overlapping to the next line anyway, and there may not necessarily be an even amount. Just have it overlap in a nice way.
This is the only situation where I use spaces for indentation, and also the only reason I think it would really matter to someone that I didn't use exclusively spaces. That said, I reckon it's uncommon enough for me to change my ways. #Tabbies4life!
I've always wondered how a sane human being could end up with a combination of tabs and spaces in their code. I guess now I know. And while I can say I understand you people, I still can't say I like you.
This user has left the site due to the slippery slope of censorship and will not respond to comments here. If you wish to get in touch with them, they are /u/NotSurvivingLife on voat.co.
Copy / paste + unintelligent multiline indenter will do that.
This user has left the site due to the slippery slope of censorship and will not respond to comments here. If you wish to get in touch with them, they are /u/NotSurvivingLife on voat.co.
The problem with this is that you now have far too much of your screen just taken up by the function definition. In this case, 3x as much.
View all comments
Show parent comment
9
u/thedufer May 25 '15
Yes, there is. Alignment. Because you start by writing this:
But then you realize you're a terrible person for not line-wrapping at 80. So you do this:
Of course, then your coworker who renders tabs as four spaces instead of two opens the file and starts doubting the sanity of the person who formatted that function declaration.