[parted-devel] [PATCH] doc: add HACKING

Petr Uzel petr.uzel at suse.cz
Fri Apr 23 09:09:15 UTC 2010


On Fri, Apr 23, 2010 at 10:51:01AM +0200, Jim Meyering wrote:
> Petr Uzel wrote:
> 
> > On Sat, Apr 17, 2010 at 05:43:01PM +0200, Jim Meyering wrote:
> >> FYI, I've just pushed this and expect to have to adjust it.
> >>
> >> Not everything in it is true yet (e.g., leading TABs),
> >> but that should change soon.  Of course, it'll take some
> >> work to make these style and indentation preferences sensible.
> >>
> > [...]
> >>
> >> +Minor syntactic preferences
> >> +===========================
> >> +[I hesitate to write this one down, because it appears to be an
> >> + acquired taste, at least for native-English speakers.  It seems odd
> >> + (if not truly backwards) to nearly anyone who doesn't have a strong
> >> + mathematics background and perhaps a streak of something odd in their
> >> + character ;-) ]
> >> +In writing arithmetic comparisons, use "<" and "<=" rather than
> >> +">" and ">=".  For some justification, read this:
> >> +  http://thread.gmane.org/gmane.comp.version-control.git/3903/focus=4126
> >
> > In the referenced email (and whole thread), I don't see any reason why
> > (1 < x) should be preferred over (x > 1), except the statement
> > "textual order should reflect actual order" - OK, but why?
> >
> > And yes, (1 < x) really looks unnatural to me.
> 
> Even when it's part of a range check?
> 
>   1 < x && x < n

I agree it might be more readable in such case. But from the HACKING I
got the impression that the 1 < x is preferred even if it is just
simple 'variable to constant' comparison.


Petr

--
Petr Uzel, openSUSE Boosters Team
IRC: ptr_uzl @ freenode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20100423/11b7272c/attachment.pgp>


More information about the parted-devel mailing list