comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Records that could be arrays
Date: Sat, 25 Feb 2006 12:39:20 +0100
Date: 2006-02-25T12:39:12+01:00	[thread overview]
Message-ID: <189zs75645p7g.1usdp56yox0lg$.dlg@40tude.net> (raw)
In-Reply-To: KqSdnZXQUfnZ5WLenZ2dnUVZ_smdnZ2d@megapath.net

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



  reply	other threads:[~2006-02-25 11:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-23  4:11 Records that could be arrays Justin Gombos
2006-02-23  4:51 ` tmoran
2006-02-23 13:19   ` Justin Gombos
2006-02-24 10:19     ` Stephen Leake
2006-02-23  6:32 ` Wilhelm Spickermann
2006-02-23 13:08   ` Stephen Leake
2006-02-23 13:20   ` Justin Gombos
2006-02-23 14:29     ` Wilhelm Spickermann
2006-02-24 10:31       ` Stephen Leake
2006-02-26 22:34         ` Wilhelm Spickermann
2006-02-23  8:21 ` john Doef
2006-02-23  9:22 ` Jean-Pierre Rosen
2006-02-23 13:11   ` Stephen Leake
2006-02-23 13:37   ` Justin Gombos
2006-02-23 13:06 ` Stephen Leake
2006-02-23 20:23   ` Simon Wright
2006-02-24 21:23   ` Randy Brukardt
2006-02-25 11:39     ` Dmitry A. Kazakov [this message]
2006-02-26  3:24       ` Steve Whalen
2006-02-26  9:51         ` Dmitry A. Kazakov
2006-02-27  2:26           ` Steve Whalen
2006-02-27  9:33             ` Dmitry A. Kazakov
2006-03-01 22:44             ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox