From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,4c42ac518eba0bbe X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,4c42ac518eba0bbe X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,4c42ac518eba0bbe X-Google-Attributes: gid103376,public From: Alan E & Carmel J Brain Subject: Re: Coding for Obscurity Date: 1997/11/20 Message-ID: <3474BF28.2F9F@dynamite.com.au>#1/1 X-Deja-AN: 290890962 References: <343fbb5a.0@news.iprolink.ch> <34466EB4.3381@dynamite.com.au> <6275dt$agm$3@news.on> <344BCED0.2D51@dynamite.com.au> <62tpap$7gh$1@darla.visi.com> <3470EF6E.F74@lysator.liu.se> <64qsf0$ccc@dfw-ixnews11.ix.netcom.com> Organization: @home Reply-To: aebrain@dynamite.com.au Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1997-11-20T00:00:00+00:00 List-Id: firewind wrote: > I find myself using a construct like this a lot recently (snipped directly > from code I'm working on right now): > > if(!to && !(to = malloc(sizeof *to)))) return(NULL); > > For 'verbose' code this would be written: > > if(!to) { > if(!to = malloc(sizeof *to)) { > return(NULL); > } > } > > I find this unacceptable. The first form is understood well enough anyway > The > > if(foo() || bar()) > > construct may seem obfuscated and weird to you, it is the way the logic of > some people's minds work. No further evidence, I rest my case. Would anyone in comp.lang.c like to comment? -- aebrain@dynamite.com.au <> <> How doth the little Crocodile | Alan & Carmel Brain| xxxxx Improve his shining tail? | Canberra Australia | xxxxxHxHxxxxxx _MMMMMMMMM_MMMMMMMMM abrain@cs.adfa.oz.au o OO*O^^^^O*OO o oo oo oo oo By pulling MAERKLIN Wagons, in 1/220 Scale