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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f822ae7b0f7433c1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.newsland.it!aioe.org!not-for-mail From: Cesar Rabak Newsgroups: comp.lang.ada Subject: Re: Translating an embedded C algorithm Date: Fri, 19 Jan 2007 21:25:08 -0200 Organization: Aioe.org NNTP Server Message-ID: References: <1168871816.263502.212100@11g2000cwr.googlegroups.com> <45ace573$1_3@news.bluewin.ch> <68qioe.mes.ln@hunter.axlog.fr> <1168963927.396654.169380@s34g2000cwa.googlegroups.com> <11e7vht8gdl0z$.2dypcyr85i3w.dlg@40tude.net> <147rcq0tjavdf.lzroutxxh59k$.dlg@40tude.net> <9Q9sh.29705$E02.12104@newsb.telia.net> NNTP-Posting-Host: zEJK12x7djBBvRARhduGQA.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org In-Reply-To: User-Agent: Thunderbird 1.5.0.8 (X11/20061109) Xref: g2news2.google.com comp.lang.ada:8354 Date: 2007-01-19T21:25:08-02:00 List-Id: Bj�rn Persson escreveu: > Cesar Rabak wrote: > >> Bj�rn Persson escreveu: >>> Cesar Rabak wrote: >>> >>>> C has case statements as well. >>> The switch statement is utterly broken (so to speak). I prefer not to use >>> it. I suppose my code contains slightly more "==" because of this. >>> >> The problem with people prefering or not certain things is exactly this! >> You are on the 'not use it [C case statements], and a lot of developers >> in 'not use Ada at all'... > > Huh? > > Dmitry guessed that Ada programmers' use of case statements contributes to > comparisons against constants with the equality operator being less > frequent in Ada code than in C code. You objected, saying "C has case > statements as well." You thereby implied that the use of case statements > cannot contribute to any such difference in frequency. Yes. I do not intend to write a PhD thesis on it, but I think so. > I provided a counter > example, explaining how I don't use the switch statement even though it > exists, and how this causes a my C code to contain more equality operators. You're explanation (still available above) says explicitly "..I prefer.." after a gratuitous judgement "...s utterly broken...". > > Now my not using switch statements is somehow a problem to you? Why is that, > and what does it have to do with how frequently equality operators are > used? > Your preferences and your use of any language construct is not a problem to me. I just found your statement a good (counter) example on how easy is to find justifications for use of something, which includes Ada language. > Do you perchance try to use as many different things as you possibly can, > just so that you'll be able to say that there is nothing in the word that > you prefer not to use? > No, I try to use the things each language offers me to be the more idiomatically within the language proposition. Disguising case ('swuitch') constructs with other low level equivalent code falls in this category. But in your code for your boss/client you the way you want or is allowed to, OK!? I just commented your witness! Regards, -- Cesar Rabak