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=0.6 required=5.0 tests=BAYES_00,FROM_WORDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,577df5d4a0e88785 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-11 20:39:42 PST Path: supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.flash.net!news.flash.net!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada References: <910u3p$v9j$1@nnrp1.deja.com> <3A3445A8.8FC404D5@acm.org> <912ut9$fga$1@nnrp1.deja.com> <9143un$fev$1@nnrp1.deja.com> Subject: Re: constant string array X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Tue, 12 Dec 2000 04:39:39 GMT NNTP-Posting-Host: 216.215.65.72 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 976595979 216.215.65.72 (Mon, 11 Dec 2000 22:39:39 CST) NNTP-Posting-Date: Mon, 11 Dec 2000 22:39:39 CST Organization: FlashNet Communications, http://www.flash.net Xref: supernews.google.com comp.lang.ada:2976 Date: 2000-12-12T04:39:39+00:00 List-Id: "Robert Dewar" wrote in message news:9143un$fev$1@nnrp1.deja.com... : In article , : "Ken Garlington" wrote: : > "Robert Dewar" wrote in message : > news:912ut9$fga$1@nnrp1.deja.com... : > : > : You can get some feeling for this by supposing that someone : > : looking at the above code decides to replace : > : : > : A : boolean; : > : : > : by : > : : > : type motor_status is (on, off); : > : a : motor_status; : > : : > : with a revision history saying : > : : > : use ON/OFF for motor status instead of True/False, makes : > : code clearer. : > : : > : Now the spelled out version is easily fixed, the compact : > : one line "trick" version no longer works. : > : > Of course, if the underlying representation is important (0 : for False, 1 for : > True), you may have broken some other things as well... : : : Well such a dependence not properly documented is a pretty : ugly thing. After all your paragraph above assumes you : are using nasty low level stuff, and such low level stuff : should be well documented and well isolated :-) Just to be inordinately picky, I could argue that the original definition implied a potential dependence on "two enumeration literals False and True ordered with the relation False < True", which the maintainer arbitarily ignored! Even if there's no low-level stuff going on, I might have declared an array with a Boolean index (for example), relying on this property. At a minimum, it would seem more logical to maintain the relation Off < On.