Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!pacbell.com!pacbell!att!cbnewsm!lfd From: lfd@cbnewsm.att.com (leland.f.derbenwick) Newsgroups: comp.lang.c Subject: Re: TRUE and FALSE Summary: Isn't that the point? Message-ID: <1990Aug30.214349.19066@cbnewsm.att.com> Date: 30 Aug 90 21:43:49 GMT References: <11215@alice.UUCP> <514@demott.COM> <2316@cirrusl.UUCP> <11369@crdgw1.crd.ge.com> Organization: AT&T Bell Laboratories Lines: 40 In article <11369@crdgw1.crd.ge.com>, volpe@underdog.crd.ge.com (Christopher R Volpe) writes: > In article <2316@cirrusl.UUCP>, dhesi%cirrusl@oliveb.ATC.olivetti.com > (Rahul Dhesi) writes: > |> > |>When I find somebody who really, really, really wants to define TRUE > |>and FALSE, even somebody who uses them for assignment only, I recommend > |>the following defines instead: > |> > |> #define ZERO 0 > |> #define ONE 1 > |> > > Ugh. Those say nothing. They don't hint to the boolean nature of the > variables being assigned to. They're as useless as the comments in > the following code: [deleted] Am I the only one out here who thought that "Those say nothing" was _exactly_ the point of the posting? I saw the ZERO/ONE posting as a parody of the TRUE/FALSE suggestion, pointing out gently that #defining TRUE and FALSE is about as useful as ONE and ZERO -- they are hacks for people who don't approve of the original choice made when the language was invented. And defining TRUE and FALSE tends to lead, eventually, to some maintenance programmer who's just (almost) learned C writing if (flag == TRUE) which of course doesn't work at all the way it looks. (Though I'll admit it reads well: "if flag is true...") IMHO, any "improvement" that would lead a novice into this sort of error is a step backwards. Of course, this is now the st rehashing of this issue in this newsgroup, and it's essentially become a religious war. -- Speaking strictly for myself, -- Lee Derbenwick, AT&T Bell Laboratories, Warren, NJ -- lfd@cbnewsm.ATT.COM or !att!cbnewsm!lfd