Formatting of bootscripts

that weasel weasel at
Tue Jan 4 19:54:25 PST 2005

On Tue, 2005-01-04 at 21:36 -0600, Bruce Dubbs wrote:
> I also teach that different organizations have different coding 
> standards and they have to adapt to that.  Open source, of course, has 
> its own standards, but not every project uses the same standards. 

I'm a bit at odds about which of these two I like better.  I think the
first one, visually is some how more appealing, but it doesn't work well
on large blocks of code.

> For instance, many projects use:
> if ( some condition) {
>    code;
> }
> but others use
> if ( some condition)
> {
>    code;
> }
> To create visually balanced braces.
> Also, the classic (K&R) pointer declaration is 'int *var', but the type 
> is really a pointer and other projects (Strostrup) use 'int* var' or 
> even 'int * var'.

Logically speaking I think the * belongs with the data type since its
effects the data type that is created.  I don't like the last form
because it looks too much like a mathmatical expression. 

> There are some coding standards I personally like better than others, 
> but to get along, participants have to adapt to the standards, not the 
> project. 
>   -- Bruce


More information about the lfs-dev mailing list