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: fdb77,5f529c91be2ac930 X-Google-Attributes: gidfdb77,public X-Google-Thread: 11232c,59ec73856b699922 X-Google-Attributes: gid11232c,public X-Google-Thread: 1108a1,59ec73856b699922 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-02 05:57:45 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mcq95@earthlink.net (Marc A. Criley) Newsgroups: comp.lang.java.advocacy,comp.object,comp.lang.ada,misc.misc Subject: Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died) Date: 2 May 2003 05:57:44 -0700 Organization: http://groups.google.com/ Message-ID: <254c16a.0305020457.6d5d563d@posting.google.com> References: <9fa75d42.0304230424.10612b1a@posting.google.com> <9fa75d42.0304240950.45114a39@posting.google.com> <4a885870.0304291909.300765f@posting.google.com> <416273D61ACF7FEF.82C1D1AC17296926.FF0BFD4934A03813@lp.airnews.net> <9fa75d42.0305010621.55e99deb@posting.google.com> <254c16a.0305011035.13133e8d@posting.google.com> <9fa75d42.0305011727.5eae0222@posting.google.com> NNTP-Posting-Host: 12.158.183.115 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1051880265 5904 127.0.0.1 (2 May 2003 12:57:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 2 May 2003 12:57:45 GMT Xref: archiver1.google.com comp.lang.java.advocacy:63035 comp.object:62536 comp.lang.ada:36850 misc.misc:13892 Date: 2003-05-02T12:57:45+00:00 List-Id: softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305011727.5eae0222@posting.google.com>... > Like I said, Ada has amazing amounts of itsy-bitsy stuff. > Now which of these features, if missing, would take you > more than a minor effort to provide yourself? If and > when necessary, rather than present by default all the time? As someone else noted, it requires _zero_ effort on my part to have access to these standardized, portable, correctly implemented, features. Out of curiousity I did a quick scan of a little throwaway utility I wrote to find out which attributes it utilizes. Here's the list: 'Range, 'Pos, 'Value, 'Read, 'Last, and 'Image. Could I have still written the program using mechanisms other than those attributes to accomplish their purpose? Of course. But I didn't have to. This was a throwaway program so I didn't want to spend much time on it. And all those attributes will continue to work even if I alter the type definitions to which they're applied (which can happen a lot when hacking out something quick and dirty). Again, I could have ensured that when I implemented their equivalents that they would be flexible enough to handle that kind of modification. But this was a throwaway program, so why go to all that effort when I can write: for H in Capped_Header'Range loop With 'Range in particular, I didn't have to hardcode the array bounds--it's just as "cheap" to type 'Range, and 'Range automatically adapts to changed bounds. I didn't have to define and maintain #define's or consts to define those bounds, whose updating could be overlooked. I didn't have to write a CCappedHeader class with data members and member functions first() and last(), or an iterator. I typed one line of code in less than three seconds that was portable, correct, and automatically adapted to changes in the array's type definition. How many portable, correct, and adaptable functions and classes can you write in less than three seconds? Marc A. Criley