From: Stephen Leake <stephe_on_the_web@toadmail.com>
Subject: Re: Records that could be arrays
Date: Fri, 24 Feb 2006 05:19:18 -0500
Date: 2006-02-24T05:19:18-05:00 [thread overview]
Message-ID: <uoe0xqct5.fsf@toadmail.com> (raw)
In-Reply-To: _DiLf.19641$HU.2213@trnddc04
Justin Gombos <rpbkbq.xax.gld@uluv.kbq> writes:
> On 2006-02-23, tmoran@acm.org <tmoran@acm.org> wrote:
>> But with
>> type Rows is new Local_Float;
>> type Cols is new Local_Float;
>> the compiler's type checking can point out such errors. In that case,
>> of course, you have to use a record
>
> Sure, my rule wouldn't apply there because we're no longer talking
> about a composite of a single element type.
>
> Cohen uses x,y coodinates of different types as an example of over
> typing. I'm kind of on the fence. I've been declaring every
> dimension within a coordinate system to have the same element type
> because it seems to be more of a hinderance than a benefit to seperate
> them. The question is whether y is a function of x,
Or if you want the Cartesian magnitude: sqrt (x**2 + y**2). Or any
other function that involves x and y in a single expression. Like
rotation:
Rotated_Point := (a * Point (x) + b * Point (y), c * Point (x) + d *
Point (y));
> which can't always be answered when the type comes into existence.
If it's a _point_, we already know about such things. If it's a
genuinely new type, yes, it might be unclear.
--
-- Stephe
next prev parent reply other threads:[~2006-02-24 10:19 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 [this message]
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
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