Re: list algebra

From: Tony Douglas <tonyisyourpal_at_netscape.net>
Date: 2 Jul 2004 03:06:13 -0700
Message-ID: <bcb8c360.0407020206.1110e712_at_posting.google.com>


"Marshall Spight" <mspight_at_dnai.com> wrote in message news:<ISoEc.1111$a24.940_at_attbi_s03>...
> To my mind, this is simply a typing question. If I have a simple
> variable of type <any>, then I can put any value of any type in
> there, but I can't do any operations on it because <any> has
> no operations.
>

No: you would able to perform the operations applicable to the current value of your variable. If you're heading into these waters, you're effectively heading into dynamic typing territory. Have a look at papers from the mid-80s in SIGPLAN by David Harland and Hamish Gunn for one approach to this (which I was a fan of for a while, and still am in wilder moments) - but having looked at how this fits with relations, I'm not convinced. I'll dig out an exact citation for you.  

> In this way of thinking, every list is homogeneous; it is simply
> homogeneous as some upper bound of the union of the types
> of all the elements.
>

The approach to types outlined by Harland & Gunn comes to pretty much the same conclusion.

>
> Marshall

Cheers,

  • Tony
Received on Fri Jul 02 2004 - 12:06:13 CEST

Original text of this message