Re: Records that could be arrays
- From: Wilhelm Spickermann <zhopi.20.unbenutzbar@xxxxxxxxxxxxxxx>
- Date: Thu, 23 Feb 2006 15:29:12 +0100
Hi,
Justin Gombos wrote:
On 2006-02-23, Wilhelm Spickermann
<zulo.20.unbenutzbar@xxxxxxxxxxxxxxx> wrote:
I think it depends on the meaning of "type". The three
floating point numbers in a polar coordinate system are of
three different _kinds_ and should be put into a record and
not into an array -- even if they have the same _type_.
Why?
These coordinates are of a different kind as they are used
differently -- all geometric formulas handle them differently.
So it is just a coincidence if they are of the same type and so
I wouldn't draw design decisions from the type alone.
This becomes also visible in the missing loop statements in
typical polar coordinate operations. And it would be rather
unusual for an array to have a special equality definition while
it is rather normal for a record (phi is "dont care" when theta
is zero -- or AFAIK the other way round in North America).
Wilhelm
.
- Follow-Ups:
- Re: Records that could be arrays
- From: Stephen Leake
- Re: Records that could be arrays
- References:
- Records that could be arrays
- From: Justin Gombos
- Re: Records that could be arrays
- From: Wilhelm Spickermann
- Re: Records that could be arrays
- From: Justin Gombos
- Records that could be arrays
- Prev by Date: Re: Records that could be arrays
- Next by Date: Re: Quick question about Ada code formatting.
- Previous by thread: Re: Records that could be arrays
- Next by thread: Re: Records that could be arrays
- Index(es):