grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Drivemap module


From: Isaac Dupree
Subject: Re: [PATCH] Drivemap module
Date: Mon, 04 Aug 2008 20:50:36 -0400
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

Javier Martín wrote:
You understand my concern, but seemingly do not understand that in order
to conform to the Holy Coding Style you are asking me to write code that
can become buggy (and with a very hard to trace bug) with a simple
deltion! (point: did you notice that last word _without_ a spelling
checker? Now try to do so in a multithousand-line program).

well, maybe a bit off topic.
But I can't imagine how, after code is written, I could accidentally delete an "=" character even when editing it. I prefer the (to me) intuitive meaning of (variable == value) in my own code. That particular problem has never bitten me. Although, in C++ coding style, a lot more local variables are "const" and therefore the error could be caught by the compiler anyway. It seems like an odd paranoia to choose. Say, take "uint32_t". It's only a one-character deletion to become int32_t and then there is subtle breakage. "htons" and many other functions with similar names and suffixes. Etc.? It's half C language and culture, and half inevitable in programming, IMHO.

point[2]: I half did notice the typo (only "half" because I've trained myself not to be too distracted by people's spelling), and I'm generally more precise when looking at code (maybe). ;-)

Anyway, since "they" are more likely to maintain the code in the long run than you, in general, the question is whether the code is more likely to become buggy by their hacking on it, if it follows project coding style or someone else's (your) "safer" coding style. Likely it's safer if using a consistent programming style. Although I personally don't see that it's very helpful to have a style that makes things down to the order of "==" arguments be consistent within the project; haphazard only slows reading the tiniest bit, and I don't think it makes a different what order the arguments are...

-Isaac




reply via email to

[Prev in Thread] Current Thread [Next in Thread]