[~/work/glusterfs]
sh$ git grep '} else {' | wc -l
1331
[~/work/glusterfs]
sh$ git grep 'else {' | grep -v '}' | wc -l
142
So going by just numbers, } else { is 10x more common than }\n else
{. I also find that believable based on familiarity of seeing this
pattern in the code.
On Tue, Oct 14, 2014 at 07:42:54AM -0400, Kaleb KEITHLEY wrote:
[~/work/glusterfs]
sh$ git grep '} else {' | wc -l
1331
[~/work/glusterfs]
sh$ git grep 'else {' | grep -v '}' | wc -l
142
So going by just numbers, } else { is 10x more common than }\n else
{. I also find
- Original Message -
Without taking sides: the last grep is including else without either { or }.
[~/work/glusterfs]
sh$ git grep '} else {' | wc -l
1331
[~/work/glusterfs]
sh$ git grep 'else {' | grep -v '}' | wc -l
142
So going by just numbers, } else { is 10x more
On 10/13/2014 08:01 AM, Pranith Kumar Karampuri wrote:
hi,
Why are we moving away from this coding style?:
if (x) {
/*code*/
} else {
/* code */
}
This patch (in master) introduces the same and explains why,
commit 0a8371bdfdd88e662d09def717cc0b822feb64e8
Author: Jeff Darcy
On 10/13/2014 07:27 PM, Shyam wrote:
On 10/13/2014 08:01 AM, Pranith Kumar Karampuri wrote:
hi,
Why are we moving away from this coding style?:
if (x) {
/*code*/
} else {
/* code */
}
This patch (in master) introduces the same and explains why,
commit
On 10/13/2014 10:08 AM, Pranith Kumar Karampuri wrote:
On 10/13/2014 07:27 PM, Shyam wrote:
On 10/13/2014 08:01 AM, Pranith Kumar Karampuri wrote:
hi,
Why are we moving away from this coding style?:
if (x) {
/*code*/
} else {
/* code */
}
This patch (in master) introduces the same and
Subject: Re: [Gluster-devel] if/else coding style :-)
On 10/13/2014 10:08 AM, Pranith Kumar Karampuri wrote:
On 10/13/2014 07:27 PM, Shyam wrote:
On 10/13/2014 08:01 AM, Pranith Kumar Karampuri wrote:
hi,
Why are we moving away from this coding style?:
if (x) {
/*code
On 10/13/2014 07:43 PM, Shyam wrote:
On 10/13/2014 10:08 AM, Pranith Kumar Karampuri wrote:
On 10/13/2014 07:27 PM, Shyam wrote:
On 10/13/2014 08:01 AM, Pranith Kumar Karampuri wrote:
hi,
Why are we moving away from this coding style?:
if (x) {
/*code*/
} else {
/* code */
}
This
top post
ISTR we agreed to use Linux kernel style!
Which is
if (foo) {
/* ... */
} else {
/* ... */
}
I don't recall any discussion on -devel about changing this.
/top post
On 10/13/2014 11:05 AM, Pranith Kumar Karampuri wrote:
On 10/13/2014 07:43 PM, Shyam wrote:
I urge you guys to notify others before making basic style
changes like this.
Yes, all style changes - including the one being enforced by the
original version of checkpatch.pl - should be submitted for review.
___
Gluster-devel mailing list
- Original Message -
+1 to existing Linux kernel style. Moreover, its a style which is used
heavily in existing code base. I don't see any advantage in changing the
style now.
It's not a change. It's already common in our code, if not actually the *most*
common style.
% find .
On 10/13/2014 04:34 PM, Jeff Darcy wrote:
- Original Message -
+1 to existing Linux kernel style. Moreover, its a style which is used
heavily in existing code base. I don't see any advantage in changing the
style now.
It's not a change. It's already common in our code, if not
Not taking sides, though if I were I would support the kernel style
because I, personally, find it easier to read. Just to clarify the point:
$ find -name '*.c' | xargs grep '} else {' | wc -l
1284
$ find -name '*.c' | xargs grep else | grep -v '}' | wc -l
1646
On 10/13/2014 01:46 PM, Shyam
(apologies, last one on the metrics from me :), as I believe it is more
about style than actual numbers at a point)
_maybe_ this is better, and it is pretty close to call now ;)
find -name '*.c' | xargs grep else | wc -l
3719
find -name '*.c' | xargs grep else | grep '}' | wc -l
1986
find
On Mon, Oct 13, 2014 at 2:00 PM, Shyam srang...@redhat.com wrote:
(apologies, last one on the metrics from me :), as I believe it is more
about style than actual numbers at a point)
_maybe_ this is better, and it is pretty close to call now ;)
find -name '*.c' | xargs grep else | wc -l
Without taking sides: the last grep is including else without either { or }.
That's true. I stand corrected.
___
Gluster-devel mailing list
Gluster-devel@gluster.org
http://supercolony.gluster.org/mailman/listinfo/gluster-devel
16 matches
Mail list logo