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: 103376,bd45e29f9dafca87 X-Google-Attributes: gid103376,public From: "Matthew Heaney" Subject: Re: bitwise comparators Date: 2000/01/17 Message-ID: #1/1 X-Deja-AN: 573877843 Content-transfer-encoding: 7bit References: <3880D375.7E363123@hotmail.com> <38829638.0@news.pacifier.com> <3882FC1C.2BA8C959@hotmail.com> Content-Type: text/plain; charset="US-ASCII" X-ELN-Date: Mon Jan 17 11:27:46 2000 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 948137266 38.26.192.68 (Mon, 17 Jan 2000 11:27:46 PST) Organization: EarthLink Network, Inc. Mime-version: 1.0 NNTP-Posting-Date: Mon, 17 Jan 2000 11:27:46 PST Newsgroups: comp.lang.ada Date: 2000-01-17T00:00:00+00:00 List-Id: In article <3882FC1C.2BA8C959@hotmail.com> , Alexander Van Hecke wrote: > But as you probably noticed, I have a C background and I'm not that familiar > with Ada. I think it's a nice feature of Ada that you can write 'readable' > code, but IMHO Ada takes a lot longer to learn, there are more constructs, > keywords, etc... In a word, the language is more complicated, yet not > necessarily more powerfull (hope I don't get flamed for this :-)). In C you'd > have one while loop, and you'd put your condition in the while expression and > that's it. Nothing more to learn about it! > What's your opinion on this? But you could have written your loop without using while: for (;;) { -- do something if (data & 1) break; } In Ada, instead of using a null for loop to do the job, we just use a loop. As far as keywords go, I consider that a specious comparison. In C, you have to know which operator symbol to use, and then try to remember the difference between "&" and "&&". Ouch! In Ada, if you want to do a bitwise and expression, you just say "and", which is more natural. In this case, it is *easier* to learn Ada than C. -- If we let the Creationists have their way, we may as well go whole hog. Let us reintroduce the flat-earth theory, the chemistry of the four elements, and mediaeval astrology. For these outworn doctrines have just as much claim to rival current scientific views as Creationism does to challenge evolutionary biology. Abusing Science: The Case Against Creationism Philip Kitcher