Re: Types and "join compatibility"

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 4 Aug 2005 12:00:42 -0700
Message-ID: <1123182042.699165.231320_at_z14g2000cwz.googlegroups.com>


vc wrote:
> Marshall Spight wrote:
> ...
>
> >
> > Alternatively, if we add two ints, we could come up with an
> > equivalent expression that involves complex numbers.
>
> Interesting... Could you, like, give an example of two integer
> addition resulting in a complex number ?
>
> > So the
> > type of integer addition is complex!
>
> Integer addition type is (+):int*int->int unless you are using your
> private vocabulary for "integer addition".

I think you need to read the whole thread to understand the context. My statement that (+):int, int -> complex was the end point of a reducto ad absurdum argument; it is not a statement I support. Specifically, I was disproving the TTM claim that the type of an expression should be the same type as any equivalent expression. Substitutability means that we can always construct an equivalent expression that "passes through" an intermediate state involving a supertype. So if we buy into that line of reasoning, the result type of any function could be considered Top. (Or Alpha, as TTM would have it.) That's the "absurdum" part.

Marshall Received on Thu Aug 04 2005 - 21:00:42 CEST

Original text of this message