[Mono-list] Style

Radek Doulík rodo@ximian.com
01 Mar 2002 11:32:29 -0500


On Pá, 2002-03-01 at 10:58, Miguel de Icaza wrote:
> > I would like to suggest that the "bad" way you have here is not bad at all.
> > I find the "good" way you have there to be more bug prone because when
> > someone later adds code do be executed when the if is true. They may write
> > it like:
> 
> I agree with the principle, but in practice, I have not run into this
> kinds of bugs for a couple of years, partly because Emacs takes care of
> this kind of problems. 

I agree that it's OK for C#, but I still want to point out one problem
in C, when emacs is not going to save you ;-)

When you use macros, it's pretty easy to do this mistake:

#define MY_MACRO \
	foo (); \
	bar ()

if (x)
	MY_MACRO;

rodo