freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] comment formatting - unneeded slashs and asterisksconsidered


From: Werner LEMBERG
Subject: Re: [Devel] comment formatting - unneeded slashs and asterisksconsidered harmful
Date: Fri, 02 Aug 2002 03:03:49 +0200 (CEST)

> There is such a thing as too much consistency, I think. It can give
> the impression that we all have to breathe in and breathe out at the
> same time ;-)

Regarding coding convention, yes.  This is the little Chinese in me.

> 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 think I've mentioned that earlier: Richard
Stallman rejects bugs which aren't formatted properly (well, this is
perhaps paranoid :-).

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

> Also, is it *really* necessary to have a rule about whether you
> write
>
> if (x)
>
> or
>
> if(x)
>
> or
>
> if ( x )
>
> ?

Yes, definitely.

> Semantics, of course, is much more important than style, and that
> applies to comments too. As I have said many times, one must make it
> as easy as possible to write and update comments, so that there is
> no deterrent to keeping them correct. That means no unwanted
> asterisks and slashes, and, as far as possible, plain text.

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.

Emacs uses a different mechanism to identify `sections' in source code
(the ^L character), but this is something only Emacs understands AFAIK
-- additionally, ^L is an invisible control character so I don't want
that in plain text.


    Werner



reply via email to

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