This is the mail archive of the
cygwin-talk
mailing list for the cygwin project.
RE: religious wars
- From: "Gary R. Van Sickle" <g dot r dot vansickle at worldnet dot att dot net>
- To: "'The Cygwin-Talk Maiming List'" <cygwin-talk at cygwin dot com>
- Date: Mon, 11 Jun 2007 19:53:27 -0500
- Subject: RE: religious wars
- References: <005301c7ac58$6a54cb70$2e08a8c0@CAM.ARTIMI.COM>
- Reply-to: The Cygwin-Talk Maiming List <cygwin-talk at cygwin dot com>
> From: Dave Korn
[...]
>
> ... because although I really dislike the ...
>
> if( arg )
> x = FuncCall( arg );
>
> ... style and much prefer the GNU ...
>
> if (arg)
> x = FuncCall (arg);
>
> ... Style
Unfortunately, both are wrong. The right way to do it is:
if(whatever)
{
// Do something here. In these nice brackets.
// Even if it's one line. Because
// as soon as you type it it'll need to be two lines.
// And then you'll have caused yourself a defect.
}
FunctionCall(arg1, another_arg);
...etc.
> (and anyway, just exactly which direction do
> brackets bind in in C, anyway, eh?),
As shown above, and like thus:
if(...)
{
// Do it.
}
while(...)
{
// Do it again.
}
FunctionDef(...)
{
// Do some stuff.
}
> It does lead me to wonder, though, if there isn't a market
> for a cross between CVS and GNU indent that transforms the
> code on check-out and check-in, so that anyone who checks out
> a sandbox gets the files formatted in their own favourite
> style, and can write code however they most prefer, and
> everyone else sees it in /their/ own favourite style, and
> nobody even has to know or care what the actual underlying
> format looks like at all.
>
Sure there is, I thought of that one like a decade ago. Trouble is, now
you're asking folks to agree on the format of the formatting specifications.
Maybe some time-travelling, space-faring, utopian civilization in the far
distant future will be able to come to some sort of agreement on such
things, but for our lifetimes such an harmonious coexistence shall remain
firmly in the realm of fantasy.
Now if you will kindly excuse me, I have work to do in *this* century,
sorting out my carriage returns from my linefeeds before my VT-52's screen
gets burned in. GOOD DAY SIR!
--
Gary R. Van Sickle