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-Thread: 103376,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-ber1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: ADA Popularity Discussion Request Date: Tue, 31 Aug 2004 12:16:55 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <49dc98cf.0408110556.18ae7df@posting.google.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1093954615 26790 134.91.1.34 (31 Aug 2004 12:16:55 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Tue, 31 Aug 2004 12:16:55 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:3206 Date: 2004-08-31T12:16:55+00:00 List-Id: Kevin Cline wrote: : Perhaps more importantly, how to write programs without : the array and the for-loop. I'd agree with you if this weren't about Ada arrays. True, some programs with little to no support for "true" arrays still show arrays where sets, maps, lists, etc. should be, using that language. But then I always miss the close connection of Ada's enumeration types and Ada's arrays, and Ada's predefined operations of array types. Ada enums allow me to name things known at compile time. In addition, Ada arrays made with an Ada enum as index type can be used like a map. Due to the index type mechanism, completeness checks are made at compile time. For example, an array aggregate must be completely specified. A case distinction looking at a value of an array's index must handle each case. Ada arrays can also be used like lists, with concatenation predefined, and with a NIL (null range). Using any number of dimensions. They can be used with generic array algorithms, with built in bounds checking and loop index optimizations. They can also be used with STL like array algorithms when there is a simple adapter that makes them look like a container. Bounds can be determined and set at run time, like index subtypes. Arrays can be returned on the stack, allowing typical recursive list processing subprograms. No for loops required. :-) -- Georg