Eric W. Biederman <[EMAIL PROTECTED]> wrote:
> > But the condition doesn't line up with the code:
>
> Exactly. The condition not lining up with the following code helps
> code helps separate the two.
Sorry about that: I realised you were agreeing with me about 5s after I sent
the message.
>
David Howells <[EMAIL PROTECTED]> writes:
> Eric W. Biederman <[EMAIL PROTECTED]> wrote:
>
>> Not lining up with the code following the if statement is also
>> a plus. Because it clearly delineates the conditions from the code.
>
> But the condition doesn't line up with the code:
Exactly. The
Eric W. Biederman <[EMAIL PROTECTED]> wrote:
> Not lining up with the code following the if statement is also
> a plus. Because it clearly delineates the conditions from the code.
But the condition doesn't line up with the code:
if (veryverylengthycondition1 &&
smallcond2
Eric W. Biederman [EMAIL PROTECTED] wrote:
Not lining up with the code following the if statement is also
a plus. Because it clearly delineates the conditions from the code.
But the condition doesn't line up with the code:
if (veryverylengthycondition1
smallcond2
David Howells [EMAIL PROTECTED] writes:
Eric W. Biederman [EMAIL PROTECTED] wrote:
Not lining up with the code following the if statement is also
a plus. Because it clearly delineates the conditions from the code.
But the condition doesn't line up with the code:
Exactly. The condition
Eric W. Biederman [EMAIL PROTECTED] wrote:
But the condition doesn't line up with the code:
Exactly. The condition not lining up with the following code helps
code helps separate the two.
Sorry about that: I realised you were agreeing with me about 5s after I sent
the message.
However
David Howells <[EMAIL PROTECTED]> writes:
> John Anthony Kazos Jr. <[EMAIL PROTECTED]> wrote:
>
>> if (veryverylengthycondition1
>> && smallcond2
>> && (conditionnumber3a
>> || condition3b)) {
>> ...
>> }
>>
>> Clear, crisp,
On 5/1/07, David Woodhouse <[EMAIL PROTECTED]> wrote:
On Tue, 2007-05-01 at 08:05 -0700, Randy Dunlap wrote:
> I prefer this format also, but I'm not sure that we can get it
> into CodingStyle. CodingStyle is about (either) concensus or
> dictum, but I don't see us close to concensus...
Yes,
On 5/1/07, John Anthony Kazos Jr. <[EMAIL PROTECTED]> wrote:
> It's horrid. I'd much rather see
>
> if (veryverylengthycondition1 &&
> smallcond2 &&
> (conditionnumber3a || condition3b)) {
> ...
> }
if (veryverylengthycondition1
From: On Behalf Of Satyam Sharma
> readable and obvious at first glance itself. For example, consider:
^^^
>
> if (veryverylengthycondition1 &&
> smallcond2 &&
> (conditionnumber3a ||
> condition3b)) {
>
John Anthony Kazos Jr. <[EMAIL PROTECTED]> wrote:
> if (veryverylengthycondition1
> && smallcond2
> && (conditionnumber3a
> || condition3b)) {
> ...
> }
>
> Clear, crisp, and 80-wide. I also like how the logical operator
On Tue, 2007-05-01 at 17:07 +0200, Geert Uytterhoeven wrote:
> For clarity, if it fits, I prefer that one, too.
I don't think that was under question, was it?
My point was that I prefer it even when it _doesn't_ fit.
--
dwmw2
-
To unsubscribe from this list: send the line "unsubscribe
On Tue, 01 May 2007 15:16:13 +0100 David Woodhouse wrote:
> On Tue, 2007-05-01 at 11:00 +0200, Geert Uytterhoeven wrote:
> >
> > if (veryverylengthycondition1 &&
> > smallcond2 &&
> > (conditionnumber3a ||
> > condition3b)) {
> > ...
>
On Tue, 2007-05-01 at 08:05 -0700, Randy Dunlap wrote:
> I prefer this format also, but I'm not sure that we can get it
> into CodingStyle. CodingStyle is about (either) concensus or
> dictum, but I don't see us close to concensus...
CodingStyle is mostly about consensus. We don't have a
On Tue, 1 May 2007, David Woodhouse wrote:
> On Tue, 2007-05-01 at 11:00 +0200, Geert Uytterhoeven wrote:
> >
> > if (veryverylengthycondition1 &&
> > smallcond2 &&
> > (conditionnumber3a ||
> > condition3b)) {
> > ...
> > }
>
> > if (veryverylengthycondition1 &&
> > smallcond2 &&
> > (conditionnumber3a ||
> > condition3b)) {
> > ...
> > }
>
> It's horrid. I'd much rather see
>
> if (veryverylengthycondition1 &&
> smallcond2 &&
>
On Tue, 2007-05-01 at 11:00 +0200, Geert Uytterhoeven wrote:
>
> if (veryverylengthycondition1 &&
> smallcond2 &&
> (conditionnumber3a ||
> condition3b)) {
> ...
> }
It's horrid. I'd much rather see
if
On 5/1/07, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote:
On Tue, 1 May 2007, Satyam Sharma wrote:
> Actually, the latter style (one condition per line and the && or ||
> operators appearing _before_ the conditions in subsequent lines)
> is quite popular for multi-line compound conditions (well,
On Tue, 1 May 2007, Satyam Sharma wrote:
> Actually, the latter style (one condition per line and the && or ||
> operators appearing _before_ the conditions in subsequent lines)
> is quite popular for multi-line compound conditions (well, I've seen this
> in kernel/workqueue.c,
On Tue, 1 May 2007, Satyam Sharma wrote:
Actually, the latter style (one condition per line and the or ||
operators appearing _before_ the conditions in subsequent lines)
is quite popular for multi-line compound conditions (well, I've seen this
in kernel/workqueue.c, kernel/stop_machine.c,
On 5/1/07, Geert Uytterhoeven [EMAIL PROTECTED] wrote:
On Tue, 1 May 2007, Satyam Sharma wrote:
Actually, the latter style (one condition per line and the or ||
operators appearing _before_ the conditions in subsequent lines)
is quite popular for multi-line compound conditions (well, I've
On Tue, 2007-05-01 at 11:00 +0200, Geert Uytterhoeven wrote:
if (veryverylengthycondition1
smallcond2
(conditionnumber3a ||
condition3b)) {
...
}
It's horrid. I'd much rather see
if (veryverylengthycondition1
if (veryverylengthycondition1
smallcond2
(conditionnumber3a ||
condition3b)) {
...
}
It's horrid. I'd much rather see
if (veryverylengthycondition1
smallcond2
On Tue, 2007-05-01 at 08:05 -0700, Randy Dunlap wrote:
I prefer this format also, but I'm not sure that we can get it
into CodingStyle. CodingStyle is about (either) concensus or
dictum, but I don't see us close to concensus...
CodingStyle is mostly about consensus. We don't have a
On Tue, 1 May 2007, David Woodhouse wrote:
On Tue, 2007-05-01 at 11:00 +0200, Geert Uytterhoeven wrote:
if (veryverylengthycondition1
smallcond2
(conditionnumber3a ||
condition3b)) {
...
}
It's horrid. I'd
On Tue, 01 May 2007 15:16:13 +0100 David Woodhouse wrote:
On Tue, 2007-05-01 at 11:00 +0200, Geert Uytterhoeven wrote:
if (veryverylengthycondition1
smallcond2
(conditionnumber3a ||
condition3b)) {
...
}
On Tue, 2007-05-01 at 17:07 +0200, Geert Uytterhoeven wrote:
For clarity, if it fits, I prefer that one, too.
I don't think that was under question, was it?
My point was that I prefer it even when it _doesn't_ fit.
--
dwmw2
-
To unsubscribe from this list: send the line unsubscribe
John Anthony Kazos Jr. [EMAIL PROTECTED] wrote:
if (veryverylengthycondition1
smallcond2
(conditionnumber3a
|| condition3b)) {
...
}
Clear, crisp, and 80-wide. I also like how the logical operator on the
From: On Behalf Of Satyam Sharma
readable and obvious at first glance itself. For example, consider:
^^^
if (veryverylengthycondition1
smallcond2
(conditionnumber3a ||
condition3b)) {
...
On 5/1/07, John Anthony Kazos Jr. [EMAIL PROTECTED] wrote:
It's horrid. I'd much rather see
if (veryverylengthycondition1
smallcond2
(conditionnumber3a || condition3b)) {
...
}
if (veryverylengthycondition1
On 5/1/07, David Woodhouse [EMAIL PROTECTED] wrote:
On Tue, 2007-05-01 at 08:05 -0700, Randy Dunlap wrote:
I prefer this format also, but I'm not sure that we can get it
into CodingStyle. CodingStyle is about (either) concensus or
dictum, but I don't see us close to concensus...
Yes, some
David Howells [EMAIL PROTECTED] writes:
John Anthony Kazos Jr. [EMAIL PROTECTED] wrote:
if (veryverylengthycondition1
smallcond2
(conditionnumber3a
|| condition3b)) {
...
}
Clear, crisp, and 80-wide. I also like
Satyam Sharma wrote:
[...]
> The rationale is to make the operator prominent and thus make
> the structure of a complex multi-line compound conditional expression more
> readable and obvious at first glance itself. For example, consider:
>
> if (veryverylengthycondition1 &&
>
> I'm a bit lost here. Are we referring to
>
> if (expr) {
> ...
> } else {
> ...
> }
>
> versus
>
> if (expr) {
> ...
> }
> else {
> ...
> }
This one is already covered by Documentation/CodingStyle
Hi,
On 4/30/07, Andrew Morton <[EMAIL PROTECTED]> wrote:
On Mon, 30 Apr 2007 10:11:21 +0100 Christoph Hellwig <[EMAIL PROTECTED]> wrote:
> I've separated this out under a new subject because some style issues
> that so far aren't documented explicitly are in doubt here, and Roland
> wants and
On Monday 30 April 2007 13:09:17 Andrew Morton wrote:
> On Mon, 30 Apr 2007 10:11:21 +0100 Christoph Hellwig <[EMAIL PROTECTED]>
wrote:
> > I've separated this out under a new subject because some style issues
> > that so far aren't documented explicitly are in doubt here, and Roland
> > wants
On Apr 30 2007 10:09, Andrew Morton wrote:
>
>This is
>
> if (expr1 &&
> expr2)
>
>versus
>
> if (expr1
> && expr2)
>
>the former is more common and is, IMO, more readable.
>
>The latter can be handy sometimes to prevent an 80-col overflow in the
>first
On Mon, 30 Apr 2007 10:11:21 +0100 Christoph Hellwig <[EMAIL PROTECTED]> wrote:
> I've separated this out under a new subject because some style issues
> that so far aren't documented explicitly are in doubt here, and Roland
> wants and Answer from Andrew.
>
> We also should put clauses on this
On Mon, 30 Apr 2007 10:11:21 +0100 Christoph Hellwig [EMAIL PROTECTED] wrote:
I've separated this out under a new subject because some style issues
that so far aren't documented explicitly are in doubt here, and Roland
wants and Answer from Andrew.
We also should put clauses on this into
On Apr 30 2007 10:09, Andrew Morton wrote:
This is
if (expr1
expr2)
versus
if (expr1
expr2)
the former is more common and is, IMO, more readable.
The latter can be handy sometimes to prevent an 80-col overflow in the
first line.
But reads like
On Monday 30 April 2007 13:09:17 Andrew Morton wrote:
On Mon, 30 Apr 2007 10:11:21 +0100 Christoph Hellwig [EMAIL PROTECTED]
wrote:
I've separated this out under a new subject because some style issues
that so far aren't documented explicitly are in doubt here, and Roland
wants and Answer
Hi,
On 4/30/07, Andrew Morton [EMAIL PROTECTED] wrote:
On Mon, 30 Apr 2007 10:11:21 +0100 Christoph Hellwig [EMAIL PROTECTED] wrote:
I've separated this out under a new subject because some style issues
that so far aren't documented explicitly are in doubt here, and Roland
wants and Answer
I'm a bit lost here. Are we referring to
if (expr) {
...
} else {
...
}
versus
if (expr) {
...
}
else {
...
}
This one is already covered by Documentation/CodingStyle (with the
Satyam Sharma wrote:
[...]
The rationale is to make the operator prominent and thus make
the structure of a complex multi-line compound conditional expression more
readable and obvious at first glance itself. For example, consider:
if (veryverylengthycondition1
smallcond2
44 matches
Mail list logo