[Ffmpeg-devel] [PATCH] from DivX, Part 1: cosmectic changes

The Wanderer inverseparadox
Fri Dec 23 01:51:29 CET 2005


On 12/22/2005 05:56 PM, Diego Biurrun wrote:

> On Thu, Dec 22, 2005 at 05:16:59PM -0500, The Wanderer wrote:
> 
>> On 12/22/2005 01:13 PM, Diego Biurrun wrote:

>>> Every whitespace character after the last non-whitespace
>>> character on a line is trailing whitespace.  If the number of
>>> non-whitespace characters on a line happens to be zero, then all
>>> the whitespace on that line is trailing.
>> 
>> I disagree with this last sentence. In order for it to be
>> considered "trailing whitespace", there must be something on the
>> line for it to trail after. If there is nothing there, then it
>> exists independently.
> 
> It trails the beginning of the line ;-p

Which I maintain is not "something" in the relevant sense, since it is
also a form of whitespace - but as I said, we disagree.

>>>> they exist for convenience of indentation, and I'd be bothered
>>>> by trying to work with code which did not have them there.
>>> 
>>> Huh?
>> 
>> Where there are two lines of code with the same level of
>> indentation, and there is a blank line between them, then when
>> moving the cursor (or what-have-you) from one of the indented lines
>> to the blank one I ordinarily expect to have it indented as far as
>> the beginning of the two lines of code - so that I do not have to
>> insert it manually in order to add further code (or a comment)
>> there. The whitespace accomplishes this.
>> 
>> As I said, it's a matter of convenience - but for most of the
>> segment of my life in which I have been remotely familiar with the
>> concept of programming, it was a convenience I took for granted; it
>> had literally never occurred to me that it might be omitted.
> 
> OK, I understand what you meant now.  Nevertheless this is something
> that your editor should do for you.  Good editors will (at least when
> properly configured) automatically indent to the right spot when you
> press enter.

And most of the ones I use do. The problem arises when *not* pressing
Enter, but pressing Up or Down - that is, when editing existing code.
Which is exactly what someone working with the code in CVS is going to
be doing. (Yes, it does now occur to me that this is not an issue when
adding code as I described. I still find it beneficial for helping me
think to be able to have the cursor at the correct indentation.)

Regardless, since I don't work with this code, it's not likely to be a 
problem for me; if others don't have a problem with it, then there's no 
real reason to continue discussing it further.

(Although... will it be necessary to use 'diff -b' on all future patches
made with editors which add and then save whitespace when working with
blank lines?)

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.





More information about the ffmpeg-devel mailing list