Re: Records that could be arrays



Wilhelm Spickermann <zulo.20.unbenutzbar@xxxxxxxxxxxxxxx> writes:

Hi,

Justin Gombos wrote:

I have set a rule for myself: Composite types composed solely
of one type of element should be declared as arrays rather than
records.
...
Thoughts?

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_.

I don't think that follows; the names indicate the kind. The names are
the same whether it's an array (the index name) or a record (the
component name).

Following Randy's suggestion, it might make sense to use different
types for the three different polar coordinates. But I would not go
that far.

--
-- Stephe
.