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: 103376,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-21 09:24:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc02.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Quality systems (Was: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)) References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc02 1053534283 12.234.13.56 (Wed, 21 May 2003 16:24:43 GMT) NNTP-Posting-Date: Wed, 21 May 2003 16:24:43 GMT Organization: AT&T Broadband Date: Wed, 21 May 2003 16:24:43 GMT Xref: archiver1.google.com comp.lang.ada:37593 Date: 2003-05-21T16:24:43+00:00 List-Id: > Having a type that magically does a mod operation every time > you do arithmetic is not an aid to readability. Target := Indices'succ(Target) [ mod Ring_Buffer_Size]; ? Even "Target := (Target+1) mod Ring_Buffer_Size;" vs "Target := Target+1;" is a step downward in abstraction. It also allows more easily the error Target := Target+1 mod Ring_Buffer_Size;