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,ffc9e2fe760c58fd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!newsfeed.stueberl.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Records that could be arrays Date: Thu, 23 Feb 2006 20:23:28 +0000 Organization: Pushface Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1140726205 1879 62.49.19.209 (23 Feb 2006 20:23:25 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 23 Feb 2006 20:23:25 +0000 (UTC) Cancel-Lock: sha1:voeNebQDX7Rp+TRhIwE2RZMhMmo= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:3113 Date: 2006-02-23T20:23:28+00:00 List-Id: Stephen Leake writes: > But records are deeply embedded in my psyche; these types just feel > more natural as records than arrays. I guess we need to catch the kids > in high school, and teach them to use arrays instead of records. I would certainly go for the record approach. Because in my world it is rare to the point of non-existence to have structures like this; there's always some extra component of a different type. What's the logical difference between (r, theta) and (x, y)? the former could hardly be treated as an array. Well, since I personally would make Metres a subtype of Float, ditto Radians, perhaps there's not that much difference in practice -- but a world, logically.