Gerald Pfeifer gerald@pfeifer.com writes:
This does not fix a bug or add a feature, but it makes the coder easier to follow. Narrower scope tends to be a good thing for variables, both for human readers and compilers (though modern ones should not need the hint).
Not necessarily, that's a matter of taste (IOW, not something you should "fix" in other people's code).
On Tue, 5 Jul 2011, Alexandre Julliard wrote:
This does not fix a bug or add a feature, but it makes the coder easier to follow. Narrower scope tends to be a good thing for variables, both for human readers and compilers (though modern ones should not need the hint).
Not necessarily, that's a matter of taste (IOW, not something you should "fix" in other people's code).
The reason I came up with this patch is that trying to debug something I got lost a bit, and reducing the scope of these variables really helped make things easier to follow.
When you are referring to "other people's code", according to git log Tony has been the primary contributor, so that would be his call then?
Tony, this is http://www.winehq.org/pipermail/wine-patches/2011-July/103866.html -- what's your take?
Gerald
Am 05.07.2011 20:33, schrieb Gerald Pfeifer:
On Tue, 5 Jul 2011, Alexandre Julliard wrote:
This does not fix a bug or add a feature, but it makes the coder easier to follow. Narrower scope tends to be a good thing for variables, both for human readers and compilers (though modern ones should not need the hint).
Not necessarily, that's a matter of taste (IOW, not something you should "fix" in other people's code).
The reason I came up with this patch is that trying to debug something I got lost a bit, and reducing the scope of these variables really helped make things easier to follow.
When you are referring to "other people's code", according to git log Tony has been the primary contributor, so that would be his call then?
Tony, this is http://www.winehq.org/pipermail/wine-patches/2011-July/103866.html -- what's your take?
Gerald
I doubt this change is critical enough to justify any need for the original author's opinion :P
I personally prefer narrow scope as well usually... if you want to change it, sure, I'm unlikely to touch that code ever again anyway..
Best regards, Tony
I think the point is more that (in general) this kind of patch is unlikely to be accepted unless you're actively maintaining the code.