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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11390f,4c42ac518eba0bbe X-Google-Attributes: gid11390f,public 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: "Mike Smith" Subject: Re: Programming language vote - results Date: 1997/11/19 Message-ID: <01bcf4f4$8fdc2c60$0200000a@kld_mcs>#1/1 X-Deja-AN: 290741386 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: KLD Labs, Inc. Newsgroups: comp.lang.ada,comp.lang.apl,comp.lang.c,comp.lang.c++ Date: 1997-11-19T00:00:00+00:00 List-Id: firewind wrote in article <64qsf0$ccc@dfw-ixnews11.ix.netcom.com>... > Again this insulting analogy. > > > Simple example from real life: > > > if (call_this() || call_that()); > > > Valid, yes. Better than > > > if (!call_this()) call_that(); > > > or more clear forms in other languages? > > Some people actually think so. > > 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); > } > } > Yeah, and what's wrong with that? Looks good to me - better than the logical expression. And in the first case, if (!call_this) call_that(); is also the better form. A good programmer writes code that even less-skilled programmers can easily read and maintain. Unless, of course, the code you write will never need to be maintained or updated, in which case it is probably of little consequence in the real world. > some people's minds work. To insult these people by comparing them to > fickle adolescents is simply out of line. > Okay, how about comparing them to snooty elitist "artists" or "craftsmen" that are more interested in form than function? (Function being defined by a whole host of things other than the actual operation of the program itself, like robustness, readability, maintainability, portability, etc.) --Mike Smith