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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: 103376,4c42ac518eba0bbe X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,4c42ac518eba0bbe X-Google-Attributes: gid109fba,public From: firewind Subject: Re: Coding for Obscurity Date: 1997/11/20 Message-ID: <650g12$dt5@dfw-ixnews9.ix.netcom.com>#1/1 X-Deja-AN: 290905061 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> <3474BF28.2F9F@dynamite.com.au> Organization: Netcom X-NETCOM-Date: Wed Nov 19 10:58:10 PM CST 1997 Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1997-11-19T22:58:10-06:00 List-Id: Alan E & Carmel J Brain wrote: > 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? >From the new Subject: I assume you have drawn the conclusion that I code in the above manner (the first 'weird' if(), I don't use the second, but the point was that 'style imperialism' is stupid) to purposely obfuscate. Nothing can be further from the truth. Obfuscated code can be written in absolutely any language, by absolutely everyone. In a bad spot, a decidedly 'clean' coder can churn out a potful of spaghetti code. -- [- firewind -] [- email: firewind@metroid.dyn.ml.org (home), firewind@aurdev.com (work) -] [- "You're just jealous because the voices talk to -me-." -] [- Have a good day, and enjoy your C. -] [- (on a crusade of grumpiness where grumpiness is due) -]