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: 11390f,4c42ac518eba0bbe X-Google-Attributes: gid11390f,public X-Google-Thread: 103376,4c42ac518eba0bbe X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,4c42ac518eba0bbe X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,4c42ac518eba0bbe X-Google-Attributes: gid1014db,public From: "Andy Knight" Subject: Re: Programming language vote - results Date: 1997/11/20 Message-ID: <880011903.1575.0.nnrp-03.c2d9cf02@news.demon.co.uk>#1/1 X-Deja-AN: 290934802 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> X-NNTP-Posting-Host: mailgate.tetraworld.com [194.217.207.2] X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2103.0 Newsgroups: comp.lang.ada,comp.lang.apl,comp.lang.c,comp.lang.c++ Date: 1997-11-20T00:00:00+00:00 List-Id: Your credibility is brought in to question when you present code that has been "snipped directly from code..." that can not possibly compile. Then you expand this codswallop into its supposed "verbose" form into something which is equally nonsensical. I'm off to adjust my filters. firewind wrote in message <64qsf0$ccc@dfw-ixnews11.ix.netcom.com>... >Ingemar Ragnemalm wrote: >> Peter Seebach wrote: >> > Can you honestly point to anyone claiming that "impenetrable" is a >> > sign of superiority out of the IOCCC? > >> There are plenty of people who use C since it is "cool", but just can't >> say what is so cool with it. It is cool because Mom can't understand it. >> No, they won't say that. > >So, you insult a great many professional C programmers, and hobbyists, et >cetra by comparing them to an adolescent who just follows the crowd? The >crowd is gaping at OOP at the moment. C is not OOP. > >> You can identify that kind of people by the >> lack of comments in the code. They *want* it that way - and they are >> many! > >I very seldom comment my code at the first writing. I prefer to just code >and get it done, then go back later and add comments, but -only- to >code which is not easily understood. > >> > Efficient is good. Tight can be good. Impenetrable is generally not >> > good. > >> When "efficient" and "tight" means as few keystrokes as possible, it >> isn't good. > >Why not? You are associating 'few keystrokes' with 'unintelligible' and >'brokenly using bad self-optimization techniques' which is not correct. > >> Efficient C code usually means that you take >> responsabilities >> that the optimizer should really do for you, and do that through >> questionable backdoors in the language. Case switches jumping into >> while loops is one example. > >'Questionable backdoors'? Some might disagree. BTW, last time I checked, >the C standard didn't garuntee there is an optimizer around to babysit you. > >> > I disagree with at least the implications of your conclusion. Writing, >> > on purpose, impenetrable, bad, inefficient, and ugly code is one of the >> > best ways to comprehend good code better. It's all well and good to say >> > "look, here's a good way to do this". It's just as good to say "and look, >> > here's a bad way". > >> > You can't understand fully what makes good code good without understanding >> > just as fully what makes bad code bad. > >> When you show the bad way to those kids, they think it is WAAAY cool! >> They will use any stinking obscure construction just because "it is >> valid C code". > >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); > } >} > >I find this unacceptable. The first form is understood well enough anyway: >If 'to' is not valid and an attempt to make 'to' valid fails, return an error. > >The > >if(foo() || bar()) > >construct may seem obfuscated and weird to you, it is the way the logic of >some people's minds work. To insult these people by comparing them to >fickle adolescents is simply out of line. > >-- >[- wind -] >[- email: firewind@metroid.dyn.ml.org (home), firewind@aurdev.com work) -] >[- "You're just jealous because the voices talk -] >[- Have a good day, and enjoy your -] >[- (on a crusade of grumpiness where grumpiness is -]