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: tmoran@bix.com Subject: Re: bitwise comparators Date: 2000/01/17 Message-ID: #1/1 X-Deja-AN: 573892841 References: <3882FC1C.2BA8C959@hotmail.com> X-Complaints-To: abuse@pacbell.net X-Trace: nnrp1-w.snfc21.pbi.net 948139569 206.170.24.31 (Mon, 17 Jan 2000 12:06:09 PST) Organization: SBC Internet Services NNTP-Posting-Date: Mon, 17 Jan 2000 12:06:09 PST Newsgroups: comp.lang.ada Date: 2000-01-17T00:00:00+00:00 List-Id: >code, but IMHO Ada takes a lot longer to learn, there are more constructs, >keywords, etc... In a word, the language is more complicated, The "Pascal"ish subset is certainly pretty simple. You only need to learn the fancy stuff as you need it. As for keywords, surely the use of "{}" in if(x > 0)x=0; if(y > 0){x=0;y=0}: requires more of the beginner than if x > 0 then x := 0;end if; if y > 0 then x := 0;y := 0;end if; >In a word, the language is more complicated, >yet not necessarily more powerfull... ID2 := ID1; vs memcpy(&ID1, &ID2, sizeof ID1); where a and b can, in Ada, be characters, floats, arrays, structures, bit fields, or anything else. In Ada you can change the type of ID's from integer to string to structure to bit field without changing all the assignment statements in your program. You also only need to remember ":=", not "=" and also "memcpy". And, for those whose brilliant programming is only constrained by their typing speed, the former takes fewer, and more easily accessible, keystrokes. >> I'd also like to point out that the "while" construct you are using is >> common for 'C' or Pascal, but in Ada you could use a "loop" construct with >> "exit when" Your original "while" was perfectly legal Ada. Things like using exit statements in loops are niceties. It is true that Ada programmers tend to worry more about questions like whether while (not OK_to_proceed) loop vs loop exit when OK_to_proceed; is more likely to result in mistakes by a later maintenance programmer. That's just another aspect of "power", should you choose to use it.