Raphael Manfredi wrote:
> In C, since there is no postfix "if" and "unless", there is no question
> about it. We must write that with a prefix "if", like:
>
> if (cond)
> return;
>
> if (cond)
> call();
>
> if (cond)
> a = b;
I don't mind as much about the above either but I do care about these:
if (cond) blah(
[..]);
if (cond)
blah([..]
...
...
);
So for *single* lines I'd agree but not for multiple. Looking at actual
examples in the code might be more convincing.
> Mistakes do happen, as the current bug shows. But mistakes can always
> happen anyway, so the fact it happened here due to a careless editing
> (no blame, I have done it too on occasions) should not be a reason to make
> it mandatory for code to look ugly.
Ugliness is in the eye of the beholder and is not a technical problem. The
mistake is a technical problem. You could say the same about all kinds of bug
sources like unnecessary brackets, not nullifying pointers after free, bold
typecasts, you name it. Almost all of those will seldomly cause a bug, bugs
should be seldom anyway. However, if there's a bug it's usually very hard to
find. Also the human eye is rather good at spotting asymmetries and oddities.
Thus the more consistency in style, the more obvious are bugs caused by typos.
--
Christian
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel