freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] comment formatting - unneeded slashs andasterisksconsidered


From: Werner LEMBERG
Subject: Re: [Devel] comment formatting - unneeded slashs andasterisksconsidered harmful
Date: Sun, 04 Aug 2002 03:03:56 +0200 (CEST)

> > No.  Have a look into the Emacs sources (75MByte in total), and
> > you will see a consistent formatting everywhere; it is considered
> > as a bug if this is not the case.

> I simply don't believe this. Full consistency would require rules to
> cover every occasion.

Almost.  The document is called standards.{texi,info,...} and is
available somewhere from ftp.gnu.org/gnu.

> Different people choose variable names differently, and prefer
> different styles of loop. For example, the same loop can always be
> coded using for, while, or do, or using for (;;) ('forever') with an
> explicit break. Almost every loop can use either boolean variables
> or gotos.  I don't want to work in an environment where absolutely
> *everything* has a rule.

Not everything, but the guide lines are here.  Just to quote from
this document:

  ...

     The rest of this section gives our recommendations for other
  aspects of C formatting style, which is also the default style of
  the `indent' program in version 1.2 and newer.  It corresponds to
  the options

     -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
     -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob

     We don't think of these recommendations as requirements, because
  it causes no problems for users if two different programs have
  different formatting styles.

     But whatever style you use, please use it consistently, since a
  mixture of styles within one program tends to look ugly.  If you are
  contributing changes to an existing program, please follow the style
  of that program.

  ...


> I certainly could not work with him. He is an important figure, and
> generally a force for good, but he has missed a lot of opportunities
> over the years because of his policies.

Well, he makes no compromises, and this causes a lot of grief, I know.
But as the chief of the church of Emacs he can do that, and the real
believer will follow him.  We should probably stop arguing about RMS
on this list...

> > > Okay, but my real idea is *not* to impose my own format, but to
> > > suggest ways in which formatting rules can be relaxed
> > > slightly. It is possible to allow both boxed and unboxed
> > > comments.
>
>
> > I don't like this.  Your suggestions to simplify the comment style
> > are well-thought, and I'm sure that we'll do something into this
> > direction, but it should be consistent.
>
> I think that the burden lies on you to say why you don't like it,
> and why full consistency (I certainly support 'good enough' partial
> consistency) beats other approaches. Remember that consistency has a
> price in time and energy that might be better spent in other
> ways. And, as I have shown, complete consistency is impossible.

The price is minimal since you get used to it quickly if you want to.
Please check the above cited document for some arguments.

> > > Also, is it *really* necessary to have a rule about whether you
> > > write
> > >
> > > if (x)
> > >
> > > or
> > >
> > > if(x)
> > >
> > > or
> > >
> > > if ( x )
> > >
> > > ?
>
> Yes, definitely.
>
> Er, why? Again I must ask for some form of argument rather than
> assertion. I believe that studies have shown that the main stylistic
> factor affecting readability is indentation, and that an indent of 4
> spaces is the best. I don't think consistency of spacing around
> conditions matters.

Sorry to say, but I don't get your point why you oppose so strongly.
My background is typography, and for well written books a consistent
grayness (i.e., the relation between black and white within
paragraphs) of a page makes reading most comfortable, and having
consistently formatted C code is exactly that.  It makes the eye
relieve, and you can concentrate on more important things.

> Why, oh why, do we have to have these horrible asterisks?

Apparently, you have a different cultural background.  David's
preference is deeply rooted in good French typography which writes
direct speech like this:

  He said: « Bla bla bla
  « blabla blabla blabla
  « bla blablabla blabla
  « blablabla blabla bla
  « bla bla. »

[This is something TeX can't do, BTW.]  Almost all cultures use bars
in the margin to emphasize something, so there are other roots also.

It costs way too much time to discuss the pros and cons about
consistency, and I won't continue here.  Please contribute code which
looks similar to the code which is already there.  Otherwise, be
prepared that I put on my formatting hat.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]