[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments
From: |
john cooper |
Subject: |
Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments |
Date: |
Mon, 23 Aug 2010 10:04:17 -0400 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071115) |
Jes Sorensen wrote:
> On 08/22/10 20:39, malc wrote:
>
>> Disregarding my own stance on the braces, braces around single statement
>> is actually helpful w.r.t. debugging imaging trying to set a break point
>> on said singlesttement, plain impossible in following case:
>>
>> if (a) b;
>>
>
> Oh there is no talk about suggesting we force things onto a single line.
> Putting if(foo) bar(); on the same line is just plain wrong, what I
> referred to was this:
>
> if (foo)
> bar();
>
> vs
> if (foo) {
> bar();
> }
>
> If it is part of a multi-block if()/else block yes it's good for
> consistency, if it is a one off in the code, it doesn't add any value
> IMHO, it is a loss because it wastes space for no reason.
>
About the only benefit I've found for that added syntactic sugar
is simplifying debug somewhat as you aren't falling in/out of the
grammar optimization.
But from a maintainability perspective, where possible I avoid
formatting which dilutes the information content in a code window.
It negatively impacts readability IMHO.
-john
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, (continued)
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Avi Kivity, 2010/08/23
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Avi Kivity, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Blue Swirl, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Anthony Liguori, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Avi Kivity, 2010/08/22
- [Qemu-devel] Re: [PATCH 0/5] CODING_STYLE amendments, Paolo Bonzini, 2010/08/23
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Jes Sorensen, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Blue Swirl, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, malc, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Jes Sorensen, 2010/08/23
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments,
john cooper <=
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Jes Sorensen, 2010/08/23
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Avi Kivity, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Blue Swirl, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Avi Kivity, 2010/08/22
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Markus Armbruster, 2010/08/23
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Avi Kivity, 2010/08/23
- Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Blue Swirl, 2010/08/17
Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments, Blue Swirl, 2010/08/13
[Qemu-devel] Re: [PATCH 0/5] CODING_STYLE amendments, Paolo Bonzini, 2010/08/15