You're right, of course. There is a small cost associated with learning to read code written in a new style. Usually when I'm reading code, I find that I'm as interested in knowing what value a variable might hold as I am in its type, and I'm happy if I don't have to scroll back too far for the local context that tells me these things. Placing the declaration at the definition and near the first use helps me to meet these goals.
At any rate, I would hardly presume to set style for X---what do I know? I'll revert Arnaud's patch, and we'll go back to enforcing the community consensus. My apologies for any disruption I've caused. --Bart On Thu, Sep 12, 2013 at 12:52 AM, Mark Kettenis <[email protected]> wrote: >> From: Bart Massey <[email protected]> >> Date: Wed, 11 Sep 2013 23:49:06 -0700 >> >> I'm talking about a programming convention that is supported by the >> existing C language, has no associated cost, complexity or difficulty, >> does not make significant semantic or syntactic change to programs, is >> easy to learn, and yet helps to prevent a common kind of bug. > > But there is an associated cost. With the C90 rules, I know where to > look for local variable declarations; they're right at the start of a > block (hopefully) seperated by a blank line from the actual code. So > I waste less time reading the code. > _______________________________________________ > [email protected]: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
