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: Graham Asher
Subject: RE: [Devel] comment formatting - unneeded slashs andasterisksconsidered harmful
Date: Sat, 3 Aug 2002 10:20:13 +0100

<<<<<<
> And consistency everywhere is an impossible dream. Different people
> have different coding styles, however you format their code.

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. 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.

<<<<<<
Richard Stallman rejects bugs which aren't formatted properly (well, this is
perhaps paranoid :-).
>>>>>>

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.

<<<<<<
> 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.

<<<<<<
> 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.

<<<<<<
Noted.  My idea is to have `major' and `minor' comments:


   /*
    *
    * foo foo foo
    *
    * bla bla bla
    *
    */


   /* foo foo foo ...
      bla bla bla ... */


I think you can live with that, can't you?  Any decent editor can
provide a left-side prefix for comments.
>>>>>>

No, I really can't live with that. Why, oh why, do we have to have these
horrible asterisks?

Best regards,

Graham







reply via email to

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