lkml.org 
[lkml]   [2004]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Lindent fixed to match reality
From
Date
David Weinehall <tao@acc.umu.se> writes:

> On Thu, Jan 29, 2004 at 09:35:03PM +0100, Måns Rullgård wrote:
>> David Weinehall <tao@acc.umu.se> writes:
>>
>> >> b) (no -bs) "sizeof(foo)" rather than "sizeof (foo)"
>> >
>> > I can't really see the logic in this, though I know a lot of people do
>> > it. I try to stay consistent, thus I do:
>> >
>> > if ()
>> > for ()
>> > case ()
>> > while ()
>> > sizeof ()
>> > typeof ()
>> >
>> > since they're all parts of the language, rather than
>> > functions/macros or invocations of such.
>>
>> What I fail to see here is why that should make a difference regarding
>> whitespace before the parens.
>
> All I'm trying to say, is that we should be consistent; most code
> has:
>
> if (), for (), case (), while ()
>
> (and possibly sizeof foo, typeof foo)
>
> but
>
> sizeof(foo), typeof(foo)
>
> which is what I dislike (consistancy is good.)

Well, those have function-like semantics in that they have a value,
unlike an if statement. That could possibly explain the difference.
I know perfectly well that sizeof is not a function, so don't bother
explaining that.

--
Måns Rullgård
mru@kth.se
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.048 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site