Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!psuvax1!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: When do you use "if ( a = b )"? Message-ID: <29561:Mar3120:32:1391@kramden.acf.nyu.edu> Date: 31 Mar 91 20:32:13 GMT References: <15617@smoke.brl.mil> <1991Mar29.195622.321@worf.harvard.edu> <1991Mar30.155003.5775@cc.helsinki.fi> Organization: IR Lines: 12 In article <1991Mar30.155003.5775@cc.helsinki.fi> wirzenius@cc.helsinki.fi (Lars Wirzenius) writes: > The major point is, why should you have to? Using define to change the > syntax essentially creates a new language, which forces everyone to > learn it. On the other hand, #define equ(a,b) ((a) == (b)) does not create a new syntax or a new language---but it's still an extra semantic burden for the reader. In fact, *anything* that extends the global namespace makes the code more difficult to read. That's why you shouldn't even define a function unless it encapsulates nontrivial semantic content. ---Dan