Re: relations aren't types?
Date: Mon, 12 Jan 2004 16:45:20 -0600
Message-ID: <slrnc068s0.vjp.adrian_at_sixfingeredman.net>
Bob Badour <bbadour_at_golden.net> schrieb:
> "Adrian Kubala" <adrian_at_sixfingeredman.net> wrote in message
> news:slrnc04jos.r0b.adrian_at_sixfingeredman.net...
>> 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. I think that most type systems have a severe
>> > short-coming here because they equate the physical representation of a
>> > given value with the logical representation.
>>
>> I don't see how you can write functions which operate on dates without
>> knowing something about the structure of the date. How would you write
>> "year" without being able to extract the year from a date?
>
> Suppose I have a date type physically represented as a large integer type as
> the number of days since July 19, 1965.
>
> How is the year part of the structure of that date type?
It's not, which is exactly why I need to know the structure (a large integer) in order to write a function which returns the year. Received on Mon Jan 12 2004 - 23:45:20 CET