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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,efe03f20164a417b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-27 05:06:44 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!pipex!uknet!hrc63!gmrc.gecm.com!valiant.gmrc.gecm.com!bill From: bill@valiant.gmrc.gecm.com (R.A.L Williams) Newsgroups: comp.lang.ada Subject: An observation of Ada (may offend) Date: 27 Mar 1995 10:28:28 GMT Organization: GEC-Marconi Research Centre Message-ID: <3l640c$308@miranda.gmrc.gecm.com> NNTP-Posting-Host: valiant.gmrc.gecm.com X-Newsreader: TIN [version 1.2 PL1] Date: 1995-03-27T10:28:28+00:00 List-Id: In article <1995Mar17.180137.9394@eisner> Larry Kilgallen wrote: : In article <3kbkm1$41o@miranda.gmrc.gecm.com>, bill@valiant.gmrc.gecm.com (R.A.L Williams) writes: : > b. No bit level manipulation (fixed in Ada95 but only for unsigned : > ie. mod INTEGERs, I can't test a sign bit, not that I need to) HCTBAEL. : Well some of us don't have Ada95 scheduled for our platforms... : ...but I find that when I need to manipulate bits it is specific bit : fields rather than generic bit-algebras :-). Representation clauses : in Ada are marvelous (although I have used similar capabilities from : other languages which don't happen to be codified in their standards). I agree that the representation clauses defined in the LRM are splendid, the problem is that they are *optional*. I don't know what the situation is now, but when I last did a lot of work in Ada many compilers had only a fragmentary coverage. Most of the time, as you say, bit fields are adequate, but how would you implement ECC alogorithms or maximal length sequence generators for instance? So far as standards are concerned, I believe that bit fields are codified in the ANSI C standard, and every ANSI C compiler I've used actually does implement them. : > e. No short cut operators (+= etc.) -- sorry, we've had this debate : > already in another thread, I've heard the objections, I still like the : > operators. : I disagree, perhaps for a reason which has not been stated. The 26 letters : and the space bar are about all that I can touch-type. Entering any : punctuation requires looking at the keyboard, so I prefer long-cut : operators. Well, OK, but variable := variable + offset; is 9 characters (not counting spaces for readability) longer than variable += offset; I would also submit that, at least when the l-value gets more complex, ie. array/structure dereference etc., that the short cut version is more readable. For a simple statement like the example above there's no real difference in readability. For my money, readability is the prime criterion. I work on jobs where code inspection is often the most cost-effective method of reducing test and integration costs. There is also a benefit in long term maintenance. : Larry Kilgallen Bill Williams bill.williams@gec-mrc.co.uk