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: 103376,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,899fc98b2883af4a X-Google-Attributes: gidf43e6,public X-Google-Thread: 1108a1,59ec73856b699922 X-Google-Attributes: gid1108a1,public X-Google-ArrivalTime: 2003-05-19 14:57:58 PST Message-ID: <3EC95355.A6B66F5C@somewhere.nil> Date: Mon, 19 May 2003 23:57:41 +0200 From: Gautier Write-only X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.java.advocacy,comp.object,comp.lang.ada,comp.software-eng Subject: Re: Logic Errors and Ada (Was: A big hairy thread on Ada, Quality, and Drivers) References: <9fa75d42.0304230424.10612b1a@posting.google.com> <9fa75d42.0305130543.60381450@posting.google.com> <254c16a.0305140549.3a87281b@posting.google.com> <9fa75d42.0305141747.5680c577@posting.google.com> <1053027582.984315@master.nyc.kbcfp.com> <3ec4b5c5$1@news.wineasy.se> <254c16a.0305160930.40bb42f9@posting.google.com> <9fa75d42.0305181502.53703035@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.218.88.20 X-Trace: news.swissonline.ch 1053381477 80.218.88.20 (19 May 2003 23:57:57 +0200) X-Complaints-To: abuse@swissonline.ch Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!news-zh.switch.ch!news.swissonline.ch!not-for-mail Xref: archiver1.google.com comp.lang.java.advocacy:64203 comp.object:63709 comp.lang.ada:37536 comp.software-eng:19305 Date: 2003-05-19T23:57:41+02:00 List-Id: soft-eng wrote: > That sounds to me an unrealistic level of discipline: subtyping > to the extent that all lattitudes and longitudes (and things > along that line) are separate types. More common usage is that both > will be just real numbers (floats), whatever the language chosen. So > academically this is an advantage, in practice it won't be there. > (Similarly, as other messages point out, in practice, any usage of > subranges you will see in Ada is just what you have in C++, > int8, int16, int32. You are spoilt with these vary high-level programming languages. Why not speaking with ah or al, ax, eax, like everybody in the real software engineering world ? Well, seriously: an Ada compiler precisely won't do the blunder of mapping blindly subtypes to their smallest container. This is a very unefficient choice. You seem obsessed by the idea that strong-typing means just making subranges. It's is a bit more than that. It means there is no misunderstanding between you (the programmer) and the compiler, about what pointers are pointing to, dimensions and sizes of arrays, not uselessly mixing enumerated types and so on. Really more a compile-time advantage. The underlying base types, this is another story. You can either let the compiler find the best match or specify the precise representation - necessary for bit fiddling. Your other obsession is that Ada is just strong-typing. The better you have is to switch off Internet and peacefully #include punched cards into your preferred machine... ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!