I'm feeling a bit guilty about this one because I suspect it was my
indentation-related review comments on some of Ken's recent soak test work
that may have been the catalyst for this thread.

We've got a few options about what to do, each bringing their own special
kind of pain.

I would be in favour of converting existing Proton Python files to use 4
spaces.  This obviously entails the up-front pain of doing the conversion,
plus some mild, occasional pain when diff-ing a file's version history that
spans the re-indentation commit (you can ignore whitespace using "git diff
--ignore-all-space" or "svn diff -x --ignore-space-change").

I think this is preferable to the frequent, long-lasting pain of switching
between 2-space and 4-space indentation when I navigate across files within
the project.  Not to mention the occasional, *severe* pain of debating
indentation styles on the mailing list.  Surely no one is actually enjoying
this discussion, and if we don't resolve it now then it's sure to come up
again in six months time ;-)

My second choice would be that we make all the Proton Python files use
2-space indentation.  Despite my preference, ceteris paribus, for 4 spaces,
this would be a less disruptive change based on Rafi's statistics.

Phil




On 15 March 2013 12:15, Ted Ross <tr...@redhat.com> wrote:

> +1.  I've also wondered why this one codebase was written with 2-space
> indentation.  My editors are all set up for 4-spaces so doing any work in
> this code is a pain.
>
> I'm in favor of converting all of it to comply with the 4-space convention.
>
> -Ted
>
>
> On 03/14/2013 09:18 AM, Ken Giusti wrote:
>
>> Not to fire off a religious flame-war here - but this has stuck in my
>> craw for awhile:
>>
>> Why is the proton C and Python code using 2 space indent?
>>
>> Two space indent does not conform with the existing QPID coding
>> guidelines established for C++ nor Java:
>>
>> https://cwiki.apache.org/qpid/**java-coding-standards.html<https://cwiki.apache.org/qpid/java-coding-standards.html>
>> https://cwiki.apache.org/qpid/**cppstyleguide.html<https://cwiki.apache.org/qpid/cppstyleguide.html>
>>
>> even python code should not be using 2 space indents, as God and Guido
>> intended:
>>
>> http://www.python.org/dev/**peps/pep-0008/#indentation<http://www.python.org/dev/peps/pep-0008/#indentation>
>>
>> Heck - the proton-j Java code uses 4 spaces!   We're not even
>> self-consistent!
>>
>> Sorry to bring this up - there's plenty of real work that needs to be
>> done for proton.  But I'm OLD, and my eyes ain't what they used to be.
>>  Working with 2 space indents isn't fun.  In the case of python, it's damn
>> painful.
>>
>> Going forward, can we please use 4 space indents?   And, over time,
>> convert the existing codebase?
>>   -K
>>
>
>

Reply via email to