Re: relations aren't types?

From: Adrian Kubala <adrian_at_sixfingeredman.net>
Date: Mon, 12 Jan 2004 16:47:56 -0600
Message-ID: <slrnc0690s.vjp.adrian_at_sixfingeredman.net>


Ok, I hate to reply twice but I think I have a better response.

John Jacob <jingleheimerschmitt_at_hotmail.com> schrieb:
> I think this is the real power of the type system in TTM. I can
> expose both in a single type. I can treat a scalar value as a whole
> by invoking operators that take arguments of that type, or I can
> access the components of some specific representation of the type and
> manipulate those.

Then we agree, the scalar-ness is not a property of the type but of who is using it. Within your library where you choose a specific representation, the type is not scalar. Outside it is. But as you say, it's all the same type, so the scalar-ness cannot be a property of the type.

There are layers of types in any system -- to a client of my date library, the date type is abstract. Within the date library, the date type might actually be a struct which is itself abstract. Within the language implementation, a struct is actually some bitvector. And finally within the processor, that sequence of bits is actually electrical potentials. None of these (well, except maybe the potentials) are fundamentally scalar, they're only scalar from the point of view of the layer above. I can always break through the abstraction barriers if I want to by unplugging the computer or waving a magnet around. Received on Mon Jan 12 2004 - 23:47:56 CET

Original text of this message