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 08:29:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Quality systems (Was: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)) Date: 21 May 2003 11:29:12 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <9fa75d42.0305141747.5680c577@posting.google.com> <3ec4b1c9$1@news.wineasy.se> <9fa75d42.0305161748.1735fc32@posting.google.com> <4W%xa.28765$cK5.11964@nwrdny02.gnilink.net> <1053353256.804734@master.nyc.kbcfp.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1053530952 19583 199.172.62.241 (21 May 2003 15:29:12 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 21 May 2003 15:29:12 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:37587 Date: 2003-05-21T11:29:12-04:00 List-Id: "Dmitry A. Kazakov" writes: > Robert A Duff wrote: > > > The design team actually went back and forth several times between two > > solutions: a kludgy "magic" package that supports unsigned types of > > certain sizes, pretty much like C, and a first-class type with syntax > > and relatively general semantics (including non-binary modulii). > > I think perhaps the magic package was the better solution. > > What about: > > 1. arbitrary modulii without add, or, xor, not. By "add", you mean "and"? Shrug. I don't like the whole concept of modular; I think it's more readable to do the "mod" explicitly. Except perhaps for low-level cases where you're mimicing hardware and the like. And I don't like the fact that in order to get one extra bit (e.g. a range of 0..2**32-1 or 0..2**64-1) I have to use modular semantics, in cases where I'm just counting things, so modular semantics is just wrong. > 2. predefined boolean array types with bit-wise and arithmetic operations, > packed, allowed for discriminants etc. I would love to have discriminants whose type is array or record. It's annoying to have to introduce pointers (and then make things aliased) in order to pass an array as a parameter to a type. - Bob