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,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!news-east.rr.com!news.rr.com!newscon06.news.prodigy.com!prodigy.net!newsmst01a.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr21.news.prodigy.com.POSTED!4988f22a!not-for-mail From: Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <42309456$1@news.broadpark.no> <1110569032.207770@athnrd02> <1110607809.837000@athnrd02> <1110608948.651588@athnrd02> Subject: Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: NNTP-Posting-Host: 69.109.140.20 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr21.news.prodigy.com 1111598772 ST000 69.109.140.20 (Wed, 23 Mar 2005 12:26:12 EST) NNTP-Posting-Date: Wed, 23 Mar 2005 12:26:12 EST Organization: SBC http://yahoo.sbc.com X-UserInfo1: TSU[@IONTBWQR]TX\ZIBNFXBWR\HPCTL@XT^OBPLAH[\RWICYFWUQBKZQLYJX\_ITFD_KFVLUN[DOM_A_NSYNWPFWNS[XV\I]PZ@BQ[@CDQDPCL^FKCBIPC@KLGEZEFNMDYMKHRL_YYYGDSSODXYN@[\BK[LVTWI@AXGQCOA_SAH@TPD^\AL\RLGRFWEARBM Date: Wed, 23 Mar 2005 17:26:12 GMT Xref: g2news1.google.com comp.lang.ada:9810 comp.lang.c++:46863 comp.realtime:1619 comp.software-eng:5220 Date: 2005-03-23T17:26:12+00:00 List-Id: "Ioannis Vranos" wrote in message news:1110608948.651588@athnrd02... > > Myself thinks though that this whole range specialisation thing is > non-sense for regular application programming at least. > Perhaps for your kind of programming, the Ada type model would be unnecessary. In fact, for many Ada programs, it is not essential. However, the ability to refine the meaning of a type, in Ada, is quite useful for many reasons when writing large-scale software where a lot of people will be involved in the process. 1. It makes the program more readable because unique names for types can be given meaningful names. 2. It enforces name equivalence within the type system, rather than relying on structural equivalence. This deprives the programmer of many hours of entertaining debugging sessions. 3. One can do simple membership tests on the specified ranges, thereby eliminating such annoying constructs as: if X >= 20 and X <= 50 then ... which sometimes leads to interesting errors. 4. The scope and visibility rules, one of the most powerful features of Ada for creating safe software, ensure that type names will not be automatically visible everywhere in the code. These are just a few benefits. I realize that, any one of these, taken by itself, might not be impressive. However, in practice, the combined power of them tends to make it easier to produce fewer errors during the development process. You might think of this model as an assist to the programmer in constraining the environment prior to coding in that environment. Such constraints have proven useful to those who learn to use them. For those who choose other courses of action, no amount of argument, proof, or demonstration of benefits will suffice. Richard Riehle