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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!news.usenetserver.com!atl-c06.usenetserver.com!news.usenetserver.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Records that could be arrays Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Sat, 25 Feb 2006 12:39:20 +0100 Message-ID: <189zs75645p7g.1usdp56yox0lg$.dlg@40tude.net> NNTP-Posting-Date: 25 Feb 2006 12:39:12 MET NNTP-Posting-Host: eb6678ea.newsread4.arcor-online.net X-Trace: DXC=6 On Fri, 24 Feb 2006 15:23:51 -0600, Randy Brukardt wrote: > Claw also has types like this: > > type Point_Type is record > X, Y : Int; > end record; > > type Size_Type is record > Width, Height : Int; -- Width=X_Size, Height=Y_Size. > end record; > > type Rectangle_Type is record > Left, Top, Right, Bottom : Int; > end record; > > That's partly because we're matching the Windows definitions for these > types, but also because these "feel" like records to me. I think that the essential question is whether co-ordinates have the same type. The rest is a question of language deficiency. In this case an inability to provide an array interface to a record type (to have enumerated components), or a record interface to an array (to have named components.) It looks logical to choose the same type for all co-ordinates. However for a teletype display they probably should be different. There is a subtler question whether absolute co-ordinates and distances should of the same type. Sort of, whether the relativity theory applies to GUI... (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de