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=2.6 required=5.0 tests=BAYES_20,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!watmath!clyde!att!ulysses!hector!dsr From: dsr@hector.UUCP (David S. Rosenblum) Newsgroups: comp.lang.ada Subject: CORRECTION Re: Collective response to := messages Message-ID: <10912@ulysses.homer.nj.att.com> Date: 30 Nov 88 19:13:40 GMT References: <8811282217.AA04896@ajpo.sei.cmu.edu> <24856@sri-unix.SRI.COM> <10906@ulysses.homer.nj.att.com> Sender: netnews@ulysses.homer.nj.att.com Reply-To: dsr@hector.UUCP (David S. Rosenblum) Organization: AT&T Bell Laboratories, Murray Hill, NJ List-Id: In article <10906@ulysses.homer.nj.att.com> dsr@hector.UUCP (David S. Rosenblum) BLEW it!: | |In order to enforce this [evenness] constraint |consistently in the manner of Ada, I would want to do the following: | |(1) Overload := so that it raises CONSTRAINT_ERROR when given an odd | right-hand-side. |(2) Overload the attributes 'SUCC and 'PRED so that they skip odd values. |(3) Overload the attributes 'POS and 'VAL so that count only even values. |(4) Overload the attribute 'FIRST so that it returns the smallest even | value of EVEN's base type. |(5) Overload the attribute 'LAST so that it returns the largest even | value of EVEN's base type. |(6) Overload the membership tests and the ".." token so that only | even ranges are considered. |(7) Overload the indexing operation for all array types I define that are | indexed by EVEN values, so that even-numbered components are stored and | accessed contiguously. |(8) Overload the aggregate operation for such array types so that | the index values for the aggregate are computed "the right way". | |Yet after all these exertions, my evenness constraint would STILL not |be enforced consistently, unless I was given several more language changes. |For example, type conversions, qualifications, attribute evaluations and |membership tests never propagate exceptions. Oops, type conversions and qualifications CAN propagate exceptions, so add the following to the above list: (9) Overload type conversion on EVEN so that CONSTRAINT_ERROR will be raised by an attempt to convert an odd value. (10) Overload qualification on EVEN so that CONSTRAINT_ERROR will be raised by an attempt to qualify an odd value. The rest of my message stands as written. ------------------------------------------------------------------- David Rosenblum UUCP: {ucbvax, decvax}!ulysses!dsr AT&T Bell Laboratories ARPA: dsr@ulysses.att.com 600 Mountain Ave. dsr%ulysses@att.arpa Murray Hill, NJ 07974-2070 (201) 582-2906 -------------------------------------------------------------------