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: 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: Ingemar Ragnemalm Subject: Re: Programming language vote - results Date: 1997/11/18 Message-ID: <3470EF6E.F74@lysator.liu.se>#1/1 X-Deja-AN: 290303629 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> Reply-To: ingemar@lysator.liu.se Organization: Lysator computer club Newsgroups: comp.lang.ada,comp.lang.apl,comp.lang.c,comp.lang.c++ Date: 1997-11-18T00:00:00+00:00 List-Id: Peter Seebach wrote: > > In article <344BCED0.2D51@dynamite.com.au>, > Alan E & Carmel J Brain wrote: > >Hence my preference for Ada. When listening to C weenies - er - > >enthusiasts talking about how their code is so tight, so efficient, and > >above all so impenetrable that it's obviously superior to another > >solution (in Ada so clear that "Any Fool could have written that"), I > >have to take a dried-frog pill and count to 10. > > 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. You can identify that kind of people by the lack of comments in the code. They *want* it that way - and they are many! > 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. 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. > 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". 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. /Ingemar