Re: Records that could be arrays



Stephen Leake <stephe_on_the_web@xxxxxxxxxxxx> writes:

But records are deeply embedded in my psyche; these types just feel
more natural as records than arrays. I guess we need to catch the kids
in high school, and teach them to use arrays instead of records.

I would certainly go for the record approach. Because in my world it
is rare to the point of non-existence to have structures like this;
there's always some extra component of a different type.

What's the logical difference between (r, theta) and (x, y)? the
former could hardly be treated as an array.

Well, since I personally would make Metres a subtype of Float, ditto
Radians, perhaps there's not that much difference in practice -- but a
world, logically.
.