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-Thread: 103376,db88d0444fafe8eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe2-gui.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Arrays indexed by fixed point types (Was: Surprise in array concatenation) User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.ada References: <1125544603.561847.32140@g47g2000cwa.googlegroups.com> <1125610942.747981.280770@f14g2000cwb.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 05 Sep 2005 15:12:46 GMT NNTP-Posting-Host: 80.4.127.115 X-Complaints-To: http://www.ntlworld.com/netreport X-Trace: newsfe2-gui.ntli.net 1125933166 80.4.127.115 (Mon, 05 Sep 2005 16:12:46 BST) NNTP-Posting-Date: Mon, 05 Sep 2005 16:12:46 BST Organization: ntl Cablemodem News Service Xref: g2news1.google.com comp.lang.ada:4443 Date: 2005-09-05T15:12:46+00:00 List-Id: On Mon, 05 Sep 2005 13:07:33 +0200, Jean-Pierre Rosen wrote: ... > If you want to associate values to arbitrary elements, use a map. > > Arrays are for discrete indices. I agree. But I'm still not satisfied. I wrote: > By the way... why aren't fixed point types discrete? I think the answer is that it wasn't seen as sufficiently important. Dmitry wrote > I think that instead of blowing up the language with countless types... I don't think that is a risk. I'm just looking for a bit more orthogonality and to get more value from fixed point types. When coding (DSP) in assembler on a FPU-less CPU (eg ARM), fixed point types are extremely common. Indexing memory by them is also common. This compact efficient code is messy to write in Ada. But then I'd also like records of discrete values to be discrete also. It'd make coding in dynamic dimensionalities massively easier. I think convincing people that's a worthwhile addition would be hard. -- Adrian